Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Reorderable Property, HeadersClass Class

Defines whether columns are reorderable using column headers.

Class: HeadersClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public bool Reorderable { get; set; }
Public Property Reorderable As Boolean

Value

True if column headers can be used to reorder columns, otherwise False.

The default value is True.

Comments

Defines whether columns are reorderable using column headers.

Even if column reordering has been enabled for column headers in general, each column that is reorderable must be defined using the ColumnClass.Reorderable property. Further, individual columns can be prevented from being reordered by using the ColumnClass.KeepPosition property.

Column reordering is possible by dragging a column header or a column footer to a new position. Column reordering using column headers is defined using the HeadersClass.Reorderable property, column reordering using column footers is defined using FootersClass.Reorderable.

Examples

C#

                }
                item.Add(new string[] { p.Name, sval });
            }
            item.Children.Sort();
        }

        private void Form1_Load(object sender, EventArgs e) {
            sftTree1.Columns.Count = 2;
            sftTree1.Headers.Reorderable = sftTree1.Footers.Reorderable = false;
            sftTree1.Headers.MergeWithNextDefault = true;
            sftTree1.Headers.AllowMergeFromPreviousDefault = true;
            sftTree1.Columns[0].MergeWithNextDefault = true;
            sftTree1.Columns[1].AllowMergeFromPreviousDefault = true;
            sftTree1.MergeStyle = MergeStyleEnum.EmptyCells;
            sftTree1.AutoRespond = false;
            sftTree1.RowHeaders.Width = 0;

VB.NET

        End Try
        item.Add(New String() {p.Name, sval})
    Next
    item.Children.Sort()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    sftTree1.Columns.Count = 2
    sftTree1.Headers.Reorderable = sftTree1.Footers.Reorderable = False
    sftTree1.Headers.MergeWithNextDefault = True
    sftTree1.Headers.AllowMergeFromPreviousDefault = True
    sftTree1.Columns(0).MergeWithNextDefault = True
    sftTree1.Columns(1).AllowMergeFromPreviousDefault = True
    sftTree1.MergeStyle = MergeStyleEnum.EmptyCells
    sftTree1.AutoRespond = False
    sftTree1.RowHeaders.Width = 0

See Also HeadersClass Class | Classes | SftTree/NET 2.0