Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

SortIndicatorPosition Property, CellBaseClass Class

Defines the sorting indicator position of the cell.

Class: CellBaseClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public SortIndicatorPositionEnum SortIndicatorPosition { get; set; }
Public Property SortIndicatorPosition As SortIndicatorPositionEnum

Value

The sorting indicator position.

The default value is SortIndicatorPositionEnum.None.

Comments

Defines the sorting indicator position of the cell.

Any cell can have a sorting indicator, although this is commonly only used for cells located in column headers.

can be defined using the following properties: RowHeadersClass.SortIndicatorPositionDefault for row headers, SftTree.SortIndicatorPositionDefault for items, HeadersClass.SortIndicatorPositionDefault for column headers, FootersClass.SortIndicatorPositionDefault for column footers.

The display of the sorting indicator is defined using the SortStatus property.

The CellBaseClass.EvaluatedSortIndicatorPosition property can be used to retrieve the actual sorting indicator position for this cell by evaluating the default settings.

Examples

C#

            ip.HAlign = HAlignmentOptionalEnum.Center;
            cell.Parts.Add(ip);
            tp = new TextPartClass("Third part");
            tp.HAlign = HAlignmentOptionalEnum.Left;
            cell.Parts.Add(tp);

            // Set a sorting indicator in the first column header
            cell = sftTree1.Headers[0,0];
            cell.SortIndicatorPosition = SortIndicatorPositionEnum.Side;
            cell.SortStatus = SortStatusEnum.Ascending;

            sftTree1.Columns.MakeOptimal(0, false);
            sftTree1.RecalcHorizontalExtent();
            sftTree1.Initializing = false;
        }

VB.NET

    ip.HAlign = HAlignmentOptionalEnum.Center
    cell.Parts.Add(ip)
    tp = New TextPartClass("Third part")
    tp.HAlign = HAlignmentOptionalEnum.Left
    cell.Parts.Add(tp)

    ' Set a sorting indicator in the first column header
    cell = sftTree1.Headers(0, 0)
    cell.SortIndicatorPosition = SortIndicatorPositionEnum.Side
    cell.SortStatus = SortStatusEnum.Ascending

    sftTree1.Columns.MakeOptimal(0, False)
    sftTree1.RecalcHorizontalExtent()
    sftTree1.Initializing = False
End Sub

See Also CellBaseClass Class | Classes | SftTree/NET 2.0