This is a migrated thread and some comments may be shown as answers.

show content

1 Answer 23 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Isabelle
Top achievements
Rank 1
Isabelle asked on 13 Jan 2016, 03:57 PM
Hi,

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

Sort by
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
Tags
TreeView
Asked by
Isabelle
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or