Spread Windows Forms 13.0 Product Documentation
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
Example


In This Topic
    RemoveColumns Method (IRangeSupport)
    In This Topic
    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