Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

UsageLocationEnum Enumeration

Used to define in which area of the control the cell or item is used.

Class: (none)
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public enum UsageLocationEnum;
Public Enum UsageLocationEnum

Values

NameDescription
itemsThe cell or item is used in the item area.
headerThe cell or item is used in the header area.
footerThe cell or item is used in the footer area.

Comments

Used to define in which area of the control the cell or item is used.

Examples

C#

            sftTree1.Headers[0, column].SortStatus = fAscending ? SortStatusEnum.Ascending : SortStatusEnum.Descending;
            m_sortedColumn = column;
            return fAscending;
        }

        private void SortData(ItemClickEventArgs e)
        {
            // sort the column last clicked
            if (e.Usage != UsageLocationEnum.header) // we are not interested if the click wasn't in the header
                return;
            if (e.Area != ItemClickAreaEnum.Cell)
                return;

            bool fAscending = SetSorted(e.Cell.ColumnIndex);

            switch (e.Cell.ColumnIndex) {

VB.NET

        sftTree1.Headers(0, column).SortStatus = SortStatusEnum.Descending
    End If
    m_sortedColumn = column
    Return fAscending
End Function

Private Sub SortData(ByVal e As ItemClickEventArgs)
    ' sort the column last clicked
    If e.Usage <> UsageLocationEnum.header Then ' we are not interested if the click wasn't in the header
        Return
    End If
    If e.Area <> ItemClickAreaEnum.Cell Then
        Return
    End If

    Dim fAscending As Boolean = SetSorted(e.Cell.ColumnIndex)

See Also | Classes | SftTree/NET 2.0