Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

AllowMergeFromPreviousDefault Property, HeadersClass Class

Defines the default value for the CellBaseClass.AllowMergeFromPrevious property for cells in column headers, whether cells allow merging with cells in the previous column.

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

Syntax

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

Value

True if cells are eligible to be used for cell merging by the previous adjacent cell, otherwise False.

The default value is False.

Comments

Defines the default value for the CellBaseClass.AllowMergeFromPrevious property for cells in column headers, whether cells allow merging with cells in the previous column.

The default settings for cell merging can be defined using these properties: HeadersClass.AllowMergeFromPreviousDefault for column headers, FootersClass.AllowMergeFromPreviousDefault for column footers and ColumnClass.AllowMergeFromPreviousDefault for each column.

Examples

C#

            }
            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;
            LoadAssembly(Assembly.GetExecutingAssembly());
        }

VB.NET

    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
    LoadAssembly(Assembly.GetExecutingAssembly())
End Sub

See Also HeadersClass Class | Classes | SftTree/NET 2.0