'Usage Dim instance As DefaultSheetDataModel Dim column As Integer Dim count As Integer instance.AddColumns(column, count)
Parameters
- column
- Index of column at which to add a new column
- count
- Number of columns to add
'Usage Dim instance As DefaultSheetDataModel Dim column As Integer Dim count As Integer instance.AddColumns(column, count)
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | Specified column index is out of range; must be between zero and the number of columns |
System.ArgumentOutOfRangeException | Specified number of columns is out of range; must be greater than zero |
If you want to add a single column, use the AddColumn method.
Private void Button1_Click(object sender, System.EventArgs e) { FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel; dm.AddColumns(2, 2); }
Private Sub Button1_Click(ByVal sender As 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.AddColumns(2, 2) End Sub