FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > SetColumnShowSortIndicator Method : SetColumnShowSortIndicator(Int32,Boolean) Method |
'Declaration Public Overloads Sub SetColumnShowSortIndicator( _ ByVal column As Integer, _ ByVal showIndicator As Boolean _ )
'Usage Dim instance As SheetView Dim column As Integer Dim showIndicator As Boolean instance.SetColumnShowSortIndicator(column, showIndicator)
public void SetColumnShowSortIndicator( int column, bool showIndicator )
This method must be called before the user does an AutoSortColumn. Otherwise, the sort indicator is displayed and remains displayed.
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(); }
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
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8