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

Make node not selectable but expandable

9 Answers 482 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 May 2011, 02:55 AM
Is it possible to make a RadTreeView node not selectable but so that you can still expand it?

9 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Tsenkov
Telerik team
answered on 06 May 2011, 04:51 PM
Hi John,

You can handle the ClientNodeClicked event and set it to node.set_selected(false). This way, the node will be expandable on dblClick, but never selected.


Regards,
Nikolay Tsenkov
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.

0
John
Top achievements
Rank 1
answered on 24 May 2011, 02:21 AM
One more question on this...

I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?
 
0
John
Top achievements
Rank 1
answered on 25 May 2011, 12:19 AM
One more question on this...

I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?
0
Kate
Telerik team
answered on 26 May 2011, 02:39 PM
Hello John,

Please try to set AutoPostBack to false for the nodes whose OnNodeClick event you do not need to fire.

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.

0
John
Top achievements
Rank 1
answered on 27 May 2011, 12:27 AM
Tree View Nodes do not appear to have a property called AutoPostBack, only the Tree View control itself. Am I missing something?
0
Accepted
Nikolay Tsenkov
Telerik team
answered on 27 May 2011, 11:14 AM
Hi John,

"I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?"
  - You can handle the ClientNodeClicking event and cancel the actual click - args.set_cancel(true). Also you will have to move the functionality from ClientNodeClicked event (since it will not fire after you cancel the click).


Regards,
Nikolay Tsenkov
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.

0
Anders
Top achievements
Rank 1
answered on 16 Feb 2016, 01:30 PM

Why isnt there just a property of a RadTreeView, lets say NodesSelectable?

 In all threads about this in this forum, answers are formed like this: 

_Try_ this: client side scripting solution, as in: "bash your head with some workaround solutions".

0
Veselin Tsvetanov
Telerik team
answered on 18 Feb 2016, 03:30 PM
Hi Anders,

Currently the RadTreeNode object does not expose public property defining whether a node can be selected or not. If you think that this feature would add considerable value to the functionality of our RadTreeView control, you con log a Feature request in our public Feedback portal.

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
0
Anders
Top achievements
Rank 1
answered on 28 Feb 2016, 04:49 PM
That would be an ugly client side hack to compensate for lacking functionality.
Tags
TreeView
Asked by
John
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
John
Top achievements
Rank 1
Kate
Telerik team
Anders
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or