Gets the hierarchy settings.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)

Syntax

C#
public Grid..::..GridHierarchy Hierarchy { get; }
Visual Basic
Public ReadOnly Property Hierarchy As Grid..::..GridHierarchy
	Get
Visual C++
public:
property Grid..::..GridHierarchy^ Hierarchy {
	Grid..::..GridHierarchy^ get ();
}
F#
member Hierarchy : Grid..::..GridHierarchy with get

Property Value

Type: Grid..::..GridHierarchy
The hierarchy settings.

Examples

 Copy imageCopy
public void ConfigureGrid(Grid grid)
{
    //Add a new header on the top hierarchical level (level 0)
    grid.Headers.Add(new Header());

    //Add a header for the 1st hierarchical level (level 1) and make it invisible
    grid.Headers.Add(new Header());

    //Create some columns and add them to the top-level header
    grid.Headers[0].Add(new Column("Quantity"));
    grid.Headers[0].Add(new Column("Price"));

    //Add a column on the 1st hierarchical level
    grid.Headers[1].Add(new Column("Name"));

    //Set hierarchical appearance
    grid.Hierarchy.ButtonBehaviour = ExpansionButtonBehaviour.ShowAlways;
    //The width of the (+/-) button
    grid.Hierarchy.ButtonWidth = 15;

    //Draw lines between headers and rows
    grid.Hierarchy.EnableHierarchicalLines = true;

    //Add a product
    Row row = grid.Rows.Add(new Product());

    //Add two purchasers of this product at the 1st hierarchical level
    row.Add(new Customer());
    row.Add(new Customer());
    row.ExpandAll();
}

See Also