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

Postback property only for child nodes

1 Answer 49 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert Dennyson
Top achievements
Rank 2
Robert Dennyson asked on 02 May 2011, 01:37 PM

how to set the Postback property only for child nodes(node that do not have child nodes), and parent nodes should not trigger server event in RadTreeView? Please help me to achieve this...

Thanks in Advance
Robert Alphonse Dennyson

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 05 May 2011, 01:40 PM
Hello Robert Dennyson,

Please take a look at the sample page that I have attached. Using client-side code I check if the node has children or not and if not the servevr event is fired:
<script type="text/javascript">
       function OnClientNodeClickingHandler(sender, args) {
           //checks if the clicked node is parent node
           if (args.get_node().get_allNodes().length != 0) {
              args.set_cancel(true);
           }
       }
   </script>


Best wishes,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Robert Dennyson
Top achievements
Rank 2
Answers by
Kate
Telerik team
Share this question
or