ComponentOne FlexGrid for WinForms
In This Topic
    Tree Grid
    In This Topic

    One of the unique and popular features of the C1FlexGrid control is the ability to add hierarchical grouping to regular data grid and display it in a Tree like structure. You can display hierarchical views of the data in a Tree Grid which allows you to collapse and expand sections of the grid by clicking on the nodes. You can create simple outline trees using FlexGrid grouping. For advanced use cases you can build Tree Grids.

    To create a Tree Grid, the C1FlexGrid introduces the concept of Node rows. Node rows do not contain regular data and act as headers under which similar data is grouped, like nodes in a regular TreeView control. They also have a Level property that defines the node hierarchy. Node rows can be collapsed and expanded, hiding or showing the data they contain. 

    For example, suppose you have a grid showing customer and order details. All the information will be there, but it will be hard to see the details of each customer and order.

    In this case, you can create a Tree Grid to group the data in a hierarchical structure for better view and accessibility as shown in the GIF below.

    Image depicting TreeGrid.

    In the upcoming sections, we will walk you through the process of turning a regular grid into a Tree grid by creating node rows.

    Note: WinForms .NET 5 Edition has only runtime assemblies. Due to the new design-time model in VS2019 Preview, which is not complete yet from the Microsoft side, we do not supply any special design-time features as of yet. However, some of the controls might show up at design-time and allow editing few properties in the property grid.