Spread Windows Forms 6.0 Product Documentation
RemoveColumns Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > IRangeSupport Interface : RemoveColumns Method


column
Column index at which to start removing columns
columnCount
Number of columns to remove

Glossary Item Box

Removes columns from the specified starting position.

Syntax

Visual Basic (Declaration) 
Sub RemoveColumns( _
   ByVal column As Integer, _
   ByVal columnCount As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As IRangeSupport
Dim column As Integer
Dim columnCount As Integer
 
instance.RemoveColumns(column, columnCount)
C# 
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.
C#Copy Code
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);
}
Visual BasicCopy Code
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

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.