ASPxTreeListPrintSettings.ExpandAllNodes Property
Gets or sets a value specifying which nodes of an ASPxTreeList should present in the export result.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to ExpandAllNodes |
---|---|---|
ASP.NET Web Forms Controls | ASPxTreeListExporter |
|
ASP.NET MVC Extensions | MVCxTreeListSettingsExport |
|
Remarks
In data-bound or unbound mode, use this property to control whether ASPxTreeList should be exported with all its nodes expanded regardless of their current expanded state. If the ExpandAllNodes property is set to false
(the default value), ASPxTreeList will be exported in its current state. Set the ExpandAllNodes property to true
, if you want the export result to contain all nodes expanded.
Setting the ExpandAllNodes property to true
in virtual mode does not result in exporting ASPxTreeList with all its nodes expanded. In virtual mode, only visible nodes can be exported (these are nodes that belong to the currently opened parent nodes). If a child node was visible, but then its parent node has been collapsed, the export result will not contain such a child node. A workaround for virtual mode would be to use ASPxTreeList’s ASPxTreeList.VirtualModeNodeCreated event and expand every created node.
MVC approach:
settings.VirtualModeNodeCreated += (s, e) => {
e.Node.Expanded = true;
};
Web Forms approach:
protected void treeList_VirtualModeNodeCreated(object sender, TreeListVirtualNodeEventArgs e)
{
e.Node.Expanded = true;
}