Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Treeview > HOWTO: Disable node collapse in RADTREEVIEW control
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Answered HOWTO: Disable node collapse in RADTREEVIEW control

Feed from this thread
  • Matthew Petersen avatar

    Posted on Mar 18, 2011 (permalink)

    How do i disable node collapse in a radtreeview control?

    I tried setting the onclientnodeclicked="return false;" which does stop the node from being collapsed but then in turn killed all the client-side asp.net validators i had on the page. (validation just didnt execute for the page at all.)

    Im using the latest 2011.1.315.40 release of RadControls for ASP.Net AJAX.

    Any assistance appreciated.

    regards,

    Matt

  • Answer Princy MVP avatar

    Posted on Mar 18, 2011 (permalink)

    Hello Mathew,

    Try the following code snippet in 'OnClientNodeCollapsing' event of RadtreeView.

    ASPX:
    <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeCollapsing="ClientNodeCollapsing">
          .   .   .   .   .    .  
    </telerik:RadTreeView>

    Java Script:
    <script type="text/javascript">
         function ClientNodeCollapsing(sender, args) {
             args.set_cancel(true);
        }
    </script>

    Thanks,
    Princy.

  • Matthew Petersen avatar

    Posted on Mar 20, 2011 (permalink)

    Thanks, that works perfectly.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Treeview > HOWTO: Disable node collapse in RADTREEVIEW control