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

Is there a way to cause a node selection to check the box?

3 Answers 41 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 13 Sep 2011, 09:00 PM
I would like for our users to be able to click on the text of the node and cause the box to be checked.  Is this possible?  If not, is there a way to prevent the selected node from changing colors to avoid a scenario where users believe they have 'checked' the node?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Sep 2011, 03:27 PM
Hello Robert,

Try the following code snippet to achieve your scenario.
C#:
function OnClientNodeClicking(sender, args)
   {
       args.get_node().check(true);
   }

Thanks,
Shinu.
0
Robert
Top achievements
Rank 1
answered on 15 Sep 2011, 04:02 PM
Hi Shinu,

Thank you for your reply!  Can you tell me if this will result in a client-side modification or will it require a postback to be effective?  If the latter, would it be possible for us to just eliminate the node selection option entirely (we're just trying to avoid a postback)?

Thank you for your help.

Bob
0
Plamen
Telerik team
answered on 16 Sep 2011, 02:38 PM
Hi Robert,

I tested the code and didn't observe postback since it is done on the client event this behavior is expected.

Hope this will help.

Best wishes,
Plamen Zdravkov
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
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or