ASPxTreeView.CheckedChanged Event
Fires after the node’s checked state has been changed by clicking on a check box.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Event Data
The CheckedChanged event's data class is TreeViewNodeEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Node | Gets a node object related to the event. |
Remarks
Write a handler for the CheckedChanged event to perform any custom actions in response to the node’s checked state being changed.
Note
The CheckedChanged event fires after a user has changed the checked state by clicking on a check box. If you change the checked state programmatically or it changes automatically (when the ASPxTreeView.CheckNodesRecursive property is set to true) the event is not invoked.
Example
The code below demonstrates how you can handle the CheckedChanged event, to change the text style of nodes which are checked (their text is displayed bold).
The image below shows the result.
protected void ASPxTreeView1_CheckedChanged(object source, DevExpress.Web.TreeViewNodeEventArgs e) {
e.Node.TextStyle.Font.Bold = e.Node.Checked;
}