Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

[DefaultValue(false)]
public bool ExpandAllNodes { get; set; }

Property Value

Type Default Description
Boolean **false**

true, to export the ASPxTreeList with all nodes expanded regardless of their expanded state; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to ExpandAllNodes
ASPxTreeList
.SettingsExport.ExpandAllNodes
ASPxTreeListExporter
.Settings.ExpandAllNodes
MVCxTreeList
.SettingsExport.ExpandAllNodes
MVCxTreeListExporter
.Settings.ExpandAllNodes
MVCxTreeListSettingsExport
.PrintSettings.ExpandAllNodes

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;
};

WebForms approach:


protected void treeList_VirtualModeNodeCreated(object sender, TreeListVirtualNodeEventArgs e)
{
    e.Node.Expanded = true;
}
See Also