TreeList.AfterExpand Event

Fires immediately after a node has been expanded.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

public event NodeEventHandler AfterExpand
Public Event AfterExpand As NodeEventHandler

Event Data

The AfterExpand event's data class is NodeEventArgs. The following properties provide information specific to this event:

Property Description
Node Gets the current Tree List node.

Remarks

Each node within the Tree List control can have a number of child nodes. Child nodes can be hidden and made visible by collapsing or expanding their parent nodes respectively. Nodes can be expanded and collapsed in the following ways:

In all cases, the AfterExpand event fires immediately after expanding the node.

Examples

The following sample code changes state images of parent nodes when they are expanded or collapsed. The TreeList.AfterExpand and TreeList.AfterCollapse events are handled for this purpose.

private void treeList1_AfterCollapse(object sender, DevExpress.XtraTreeList.NodeEventArgs e) {
   e.Node.StateImageIndex = 0;
}

private void treeList1_AfterExpand(object sender, DevExpress.XtraTreeList.NodeEventArgs e) {
   e.Node.StateImageIndex = 1;
}
See Also