Spread Windows Forms 6.0 Product Documentation
SetColumnVisible Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : SetColumnVisible Method


column
Column index
visible
Whether to display the column

Glossary Item Box

Sets whether a column on this sheet is displayed.

Syntax

Visual Basic (Declaration) 
Public Sub SetColumnVisible( _
   ByVal column As Integer, _
   ByVal visible As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim column As Integer
Dim visible As Boolean
 
instance.SetColumnVisible(column, visible)
C# 
public void SetColumnVisible( 
   int column,
   bool visible
)

Parameters

column
Column index
visible
Whether to display the column

Example

C#Copy Code
DialogResult dlg; 
bool b;
dlg = MessageBox.Show("Do you want to hide the first column?", "Get/SetColumnVisible", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.SetColumnVisible(0, false);
    b = fpSpread1.ActiveSheet.GetColumnVisible(0);
    label1.Text = "Get/SetColumnVisible for column 0 = " + b.ToString();
}
Visual BasicCopy Code
Dim dlg As DialogResult
Dim b As Boolean
dlg = MessageBox.Show("Do you want to hide the first column?", "Get/SetColumnVisible", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.SetColumnVisible(0, False)
    b = FpSpread1.ActiveSheet.GetColumnVisible(0)
    Label1.Text = "Get/SetColumnVisible for column 0 = " & b.ToString()
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.