How can i display content only on selected ending item(when item has no other sub items) and how can i check this WITHOUT postback at each selected node? Thanks!
1 Answer, 1 is accepted
0
Veselin Tsvetanov
Telerik team
answered on 18 Jan 2016, 09:25 AM
Hi Isabelle,
You can easily check for a given condition about a RadTreeView node by using the OnClientNodeClicked client event. Possible implementation of the event handler for your scenario could be:
function displayClickedDodeIfEndNode(sender, eventArgs) {
var currtentNode = eventArgs.get_node();
var currentNodeCildrenNumber = currtentNode.get_nodes().get_count();
if (currentNodeCildrenNumber == 0) {
alert(currtentNode.get_text());
}
};
You can learn more about the client side events of the RadTreeView from our Documentation.
Regards,
Veselin Tsvetanov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items