Adds a column to the data model at the specified position.
Syntax
Visual Basic (Declaration) | |
---|
Public Overloads Sub AddColumn( _
ByVal column As Integer _
) |
Parameters
- column
- Index of column at which to add new column
Remarks
Example
This example shows the use of this method by adding a new column to the model in the click event of a button and placing it in front of the fourth column.
C# | Copy Code |
---|
private void Button1_Click(object sender, System.EventArgs e)
{
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
dm.AddColumn(2);
} |
Visual Basic | Copy Code |
---|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel = CType(FpSpread1.ActiveSheetView.DataModel, FarPoint.Web.Spread.Model.DefaultSheetDataModel)
dm.AddColumn(2)
End Sub |
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also