ASPxClientTreeViewNode.SetChecked(value) Method
Sets a value indicating whether the node is checked.
#Declaration
SetChecked(
value: boolean
): void
#Parameters
Name | Type | Description |
---|---|---|
value | boolean |
|
#Remarks
The ASPxTreeView allows end-users to check nodes. Use the SetChecked method to check nodes on the client side via code.
In order to determine whether a node is checked, use the ASPxClientTreeViewNode.GetChecked method on the client side.
To learn more, see the Check Box Support topic.
#Example
The function below checks all nodes within the ASPxTreeView control on the client side.
function CheckAll(s, e) {
CheckBranch (treeview);
function CheckBranch (branch){
for (var i=0; i < branch.GetNodeCount(); i++){
branch.GetNode(i).SetChecked(true);
if (branch.GetNode(i).GetNodeCount() != 0){
CheckBranch(branch.GetNode(i));
}
}
}
}