SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Sets the sorting indicator of all header cells to the specified value.
Class: HeadersClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public void SetSortStatus( SortStatusEnum status );
Public Sub SetSortStatus( ByVal status As SortStatusEnum )
status
The sorting indicator status.
Sets the sorting indicator of all header cells to the specified value.
A cell's sorting indicator can also be changed individually using the CellBaseClass.SortStatus property.
private bool SetSorted(int column) { bool fAscending = true; // assume new column will be ascending if (m_sortedColumn == column && sftTree1.Headers[0, column].SortStatus == SortStatusEnum.Ascending) fAscending = false; // the current column is now descending // turn off sorting indicator in all column headers sftTree1.Headers.SetSortStatus(SortStatusEnum.NotSorted); // now set the new sorting indicator sftTree1.Headers[0, column].SortStatus = fAscending ? SortStatusEnum.Ascending : SortStatusEnum.Descending; m_sortedColumn = column; return fAscending; } private void SortData(ItemClickEventArgs e)
Private Function SetSorted(ByVal column As Integer) As Boolean Dim fAscending As Boolean = True ' assume new column will be ascending If m_sortedColumn = column And sftTree1.Headers(0, column).SortStatus = SortStatusEnum.Ascending Then fAscending = False ' the current column is now descending End If ' turn off sorting indicator in all column headers sftTree1.Headers.SetSortStatus(SortStatusEnum.NotSorted) ' now set the new sorting indicator If fAscending Then sftTree1.Headers(0, column).SortStatus = SortStatusEnum.Ascending Else sftTree1.Headers(0, column).SortStatus = SortStatusEnum.Descending End If m_sortedColumn = column
See Also HeadersClass Class | Classes | SftTree/NET 2.0