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


column
Column index

Glossary Item Box

Gets whether the specified column on this sheet should show a sort indicator when automatically sorted.

Syntax

Visual Basic (Declaration) 
Public Function GetColumnShowSortIndicator( _
   ByVal column As Integer _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim column As Integer
Dim value As Boolean
 
value = instance.GetColumnShowSortIndicator(column)
C# 
public bool GetColumnShowSortIndicator( 
   int column
)

Parameters

column
Column index

Return Value

Boolean: true if the column should show the sort indicator; false otherwise

Example

This example illustrates the use of this member by returning the sort indicator for the specified column header if automatic sorting is allowed.
C#Copy Code
Random r = new Random();
int i;
DialogResult dlg;
bool b;
for (i = 0; i <= 200; i++)
{
    fpSpread1.ActiveSheet.SetValue(i, 0, r.Next().ToString());
}
fpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, false);
fpSpread1.ActiveSheet.AutoSortColumn(0);
dlg = MessageBox.Show("Do you want to see the sort indicator?", "GetColumnShowSortIndicator", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, true);
    fpSpread1.ActiveSheet.AutoSortColumn(0);
    b = fpSpread1.ActiveSheet.GetColumnShowSortIndicator(0);
    label1.Text = "The GetColumnShowSortIndicator for column 0 =  " + b.ToString();
}
Visual BasicCopy Code
Dim r As New Random()
Dim i As Integer
Dim dlg As DialogResult
Dim b As Boolean
For i = 0 To 200
    FpSpread1.ActiveSheet.SetValue(i, 0, r.Next.ToString())
Next
FpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, False)
FpSpread1.ActiveSheet.AutoSortColumn(0)
dlg = MessageBox.Show("Do you want to see the sort indicator?", "GetColumnShowSortIndicator", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, True)
    FpSpread1.ActiveSheet.AutoSortColumn(0)
    b = FpSpread1.ActiveSheet.GetColumnShowSortIndicator(0)
    Label1.Text = "The GetColumnShowSortIndicator 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.