Skip to main content

ASPxTreeList.InitNewNode Event

Enables you to initialize added nodes.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v24.2.dll

NuGet Package: DevExpress.Web

#Declaration

public event ASPxDataInitNewRowEventHandler InitNewNode

#Event Data

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

Property Description
NewValues Gets a dictionary that contains the new field name/value pairs for the new row.

#Remarks

The InitNewNode event is raised when an end-user starts editing a new node. This occurs when:

Use the event parameter’s NewValues property, to specify the values in the new node.

#Example

This example shows how to initialize new node values by handling the ASPxTreeList.InitNewNode event.

The image below shows the result:

exInitNewNode

protected void ASPxTreeList1_InitNewNode(object sender,
DevExpress.Web.Data.ASPxDataInitNewRowEventArgs e) {
    e.NewValues["Budget"] = 500000;
    e.NewValues["Location"] = "Monterey";
}
See Also