Spread Windows Forms 11.0 Product Documentation
RemoveColumns Method (IRangeSupport)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > IRangeSupport Interface : RemoveColumns Method
Column index at which to start removing columns
Number of columns to remove
Removes columns from the specified starting position.
Syntax
'Declaration
 
Sub RemoveColumns( _
   ByVal column As Integer, _
   ByVal columnCount As Integer _
) 
'Usage
 
Dim instance As IRangeSupport
Dim column As Integer
Dim columnCount As Integer
 
instance.RemoveColumns(column, columnCount)
void RemoveColumns( 
   int column,
   int columnCount
)

Parameters

column
Column index at which to start removing columns
columnCount
Number of columns to remove
Example
This example removes the specified number of columns and rows.
FarPoint.Win.Spread.Model.IRangeSupport irs;
DialogResult dlg;
irs = (FarPoint.Win.Spread.Model.IRangeSupport)fpSpread1.ActiveSheet.Models.Data;
dlg = MessageBox.Show("Do you want to remove some columns and rows?", "RemoveColumns/Rows", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
irs.RemoveColumns(3, 496);
irs.RemoveRows(3, 496);
}
Dim irs As FarPoint.Win.Spread.Model.IRangeSupport
Dim dlg As DialogResult
irs = FpSpread1.ActiveSheet.Models.Data
dlg = MessageBox.Show("Do you want to remove some columns and rows?", "RemoveColumns/Rows", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
irs.RemoveColumns(3, 496)
irs.RemoveRows(3, 496)
End If
See Also

Reference

IRangeSupport Interface
IRangeSupport Members