Hi, I want to validate the radTree, checking if the user has at least selected one node. How can I do that? I tried to create a custom control binding it to a server side validation function but I receive an error saying that the control cannot be validated.
Can you please help me?
Thanks,
Marco
1 Answer, 1 is accepted
0
Yana
Telerik team
answered on 29 Aug 2008, 11:35 AM
Hello Marco,
You can validate RadTreeView with javascript using get_selectedNode() method of the treeview client-side object like this:
var tree = $find("<%= RadTreeView1.ClientID %>");
if (tree.get_selectedNode() == null)
{
alert("Please select a node!");
}
You should use get_selectedNodes method when MultipleSelect property is on.
Hope this helps.
Greetings,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.