ASPxTreeList.InitNewNode Event
In This Article
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 |
---|---|
New |
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:
- the ASPxTreeList.StartNodeEditing or ASPxClientTreeList.StartEditNewNode method is called;
- an end-user has clicked on the New command button.
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:
protected void ASPxTreeList1_InitNewNode(object sender,
DevExpress.Web.Data.ASPxDataInitNewRowEventArgs e) {
e.NewValues["Budget"] = 500000;
e.NewValues["Location"] = "Monterey";
}
See Also