Removes one or more columns starting with the column at the specified position.
Syntax
Parameters
- column
- Index of first column to remove
- count
- Number of columns to remove
Exceptions
Example
This example creates a new DefaultSheetDataModel, sets its number of rows and columns in the constructor and attaches it to the DataModel of the active sheet. Data is added to the first cell in the first three columns. In a button click event the RemoveColumns method removes the first two columns.
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(Me.IsPostBack)ThenReturn
DimdmAsNewFarPoint.Web.Spread.Model.DefaultSheetDataModel(8,8)
FpSpread1.ActiveSheetView.DataModel=dm
FpSpread1.ActiveSheetView.SetValue(0,0,"First")
FpSpread1.ActiveSheetView.SetValue(0,1,"Second")
FpSpread1.ActiveSheetView.SetValue(0,2,"Third")
EndSub
PrivateSubButton1_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton1.Click
DimdmAsFarPoint.Web.Spread.Model.DefaultSheetDataModel=FpSpread1.ActiveSheetView.DataModel
dm.RemoveColumns(0,2)
EndSub |
C# | Copy Code |
---|
privatevoidPage_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;
FarPoint.Web.Spread.Model.DefaultSheetDataModeldm=newFarPoint.Web.Spread.Model.DefaultSheetDataModel(8,8);
FpSpread1.ActiveSheetView.DataModel=dm;
FpSpread1.ActiveSheetView.SetValue(0,0,"First");
FpSpread1.ActiveSheetView.SetValue(0,1,"Second");
FpSpread1.ActiveSheetView.SetValue(0,2,"Third");
}
privatevoidButton1_Click(objectsender,System.EventArgse)
{
FarPoint.Web.Spread.Model.DefaultSheetDataModeldm=(FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
dm.RemoveColumns(0,2);
} |
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