Disable Postback on RadTreeView on specific condition

2 posts, 0 answers
  1. Yefta
    Yefta avatar
    14 posts
    Member since:
    Mar 2015

    Posted 08 Oct 2015 Link to this post

    I have a RadTreeView that call OnNodeClick event, and a textbox contain "YES" or "NO"

    What i have to achieve is:

    Can i disable OnNodeClick event and postback when the textbox contain "NO"??

    can i achieve this using OnClientNodeClicking event to cancel OnNodeClick event like this?

    thank you

  2. Eyup
    Eyup avatar
    3617 posts

    Posted 13 Oct 2015 Link to this post

    Hello Yefta,

    You are absolutely correct - you can achieve this requirement using the following approach:
    <telerik:RadTreeView ... OnClientNodeClicking="nodeClicking">
    function nodeClicking(sender, args) {
        // custom condition
        if (args.get_node().get_text() == "Music") {

    Hope this helps. Please give it a try and let me know if it works for you.

    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
Back to Top