Skip to main content

Hierarchical Pane Structure

Using the ASPxSplitter control you can create a hierarchical pane structure of any complexity required.

The ASPxSplitter control is made up of a tree of panes represented by SplitterPane objects. Top level panes (called root panes) are stored within the splitter control’s ASPxSplitter.Panes collection. Each pane object can serve as a container for child panes because it implements its own SplitterPane.Panes collection. So, panes can be nested up to any depth by making any required pane the parent, and defining its child panes within its SplitterPane.Panes collection.

The code below demonstrates how the second root pane can be defined as a parent pane containing two child panes.

<dx:ASPxSplitter id="ASPxSplitter1" runat="server">
    <Panes>

        <dx:SplitterPane>
            <ContentCollection>
                <dx:SplitterContentControl runat="server">Pane 1</dx:SplitterContentControl>
            </ContentCollection>
        </dx:SplitterPane>

        <dx:SplitterPane>
            <Panes>

                <dx:SplitterPane>
                    <ContentCollection>
                        <dx:SplitterContentControl runat="server">Pane 2-1</dx:SplitterContentControl>
                    </ContentCollection>
                </dx:SplitterPane>

                <dx:SplitterPane>
                    <ContentCollection>
                        <dx:SplitterContentControl runat="server">Pane 2-2</dx:SplitterContentControl>
                    </ContentCollection>
                </dx:SplitterPane>

            </Panes>
            <ContentCollection>
                <dx:SplitterContentControl runat="server"></dx:SplitterContentControl>
            </ContentCollection>
        </dx:SplitterPane>

        <dx:SplitterPane>
            <ContentCollection>
                <dx:SplitterContentControl runat="server">Pane 3</dx:SplitterContentControl>
            </ContentCollection>
        </dx:SplitterPane>

    </Panes>
</dx:ASPxSplitter>

This code results in the following pane structure within a splitter control.

ASPxSplitter-Hierarchy.png

Note that by design, child panes are automatically arranged with an orientation opposite to their immediate parent pane. See the Pane Orientation topic to learn more.