Spread Windows Forms 8.0 Product Documentation
AddColumns Method (SheetView)
Example 


Position at which to add the new column(s)
Number of columns to add
Adds the column or columns to the data model at the specified index.
Syntax
'Declaration
 
Public Overridable Sub AddColumns( _
   ByVal column As Integer, _
   ByVal count As Integer _
) 
'Usage
 
Dim instance As SheetView
Dim column As Integer
Dim count As Integer
 
instance.AddColumns(column, count)
public virtual void AddColumns( 
   int column,
   int count
)

Parameters

column
Position at which to add the new column(s)
count
Number of columns to add
Example
This example adds two columns to the active sheet.
DialogResult dlg;
fpSpread1.ActiveSheet.Columns.Count = 4;
dlg = MessageBox.Show("Do you want to add some columns?", "AddColumns", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.AddColumns(0, 2);
}
Dim dlg As DialogResult
FpSpread1.ActiveSheet.Columns.Count = 4
dlg = MessageBox.Show("Do you want to add some columns?", "AddColumns", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.AddColumns(0, 2)
End If
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

SheetView Class
SheetView Members

User-Task Documentation

Adding a Row or Column

 

 


Copyright © GrapeCity, inc. All rights reserved.