TreeListNodeBase.IsExpanded Property

Gets or sets whether or not the node is expanded.

Namespace: DevExpress.Data.TreeList

Assembly: DevExpress.Data.Desktop.v20.1.dll

Declaration

public virtual bool IsExpanded { get; set; }
Public Overridable Property IsExpanded As Boolean

Property Value

Type Description
Boolean

true to expand the node; otherwise, false.

Remarks

To learn more, see Expanding and Collapsing Nodes .

Examples

In this demo, the TreeListView displays the file/folder tree. Child nodes that correspond to sub folders or files contained within a folder are dynamically created when a parent node is being expanded.

<Window x:Class="DynamicNodeLoading.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid>
        <dxg:GridControl Name="grid">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="Name" />
                <dxg:GridColumn FieldName="ItemType" />
                <dxg:GridColumn FieldName="Size" />
                <dxg:GridColumn FieldName="FullName" />
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TreeListView Name="treeListView1" AutoWidth="True"
                                  NodeExpanding="treeListView1_NodeExpanding"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>
See Also