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

How to multiple select node without pressing ctrl key?

5 Answers 95 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Big Q
Top achievements
Rank 1
Big Q asked on 16 Nov 2010, 08:25 AM
Hi teleirk,
    How to multiple select node without pressing ctrl key? I have a secnario, when user select a node, add it value to a textbox, but I don't want to multiple select with any keyboard, only use mouse, how to implement it?
    question 2 : Is there any client method to directly get all the selected nodes?
    suggestion: Why not add a property like ExplandDeeps, in some scenario, we usually need to expland 1 or 2 level automatic of the tree after the data was binded

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Nov 2010, 02:11 PM
Hello,


The following code will help you in selecting multiple nodes without pressing "ctrl" key.

Client code:
<script type="text/javascript">
    function OnClientNodeClicking(seder, args) {
        args.get_domEvent().ctrlKey = true;
    }
</script>


And the method 'get_selectedNodes'  retrieves an Array of all selected Nodes when MultipleSelect property is on.
RadTreeView


-Shinu.
0
Nikolay Tsenkov
Telerik team
answered on 16 Nov 2010, 06:00 PM
Hi,

"question 2 : Is there any client method to directly get all the selected nodes?"
 - get_selectedNodes method over the RadTreeView client-side object representation.

"Why not add a property like ExplandDeeps, in some scenario, we usually need to expland 1 or 2 level automatic of the tree after the data was binded
"
 - We have considered this, but the decision we took is not to implement it since it's pretty easy to implement it using the API we already provide.

I hope this will be helpful for you!


Regards,
Nikolay Tsenkov
the Telerik team
Browse the vast support resources we have to jumpstart 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
Big Q
Top achievements
Rank 1
answered on 17 Nov 2010, 02:54 AM
Hi,
    Thanks for you reply, it helps me a lot.
    As the suggestion I regarded to, I don't think it's "pretty easy ", the API that only provid a method called ExpandAllNodes, if I want to expand the first 2 layers, I have to write some code in NodeDataBound event, and have to judge if the node has parentNode. MS standard treeview control also has such a property, I thank if RadTreeView add this, it will be much more convenient.

BigQ
0
David
Top achievements
Rank 1
answered on 06 Nov 2013, 11:46 PM
Hi Shinu,

Thanks for your code. It worked without any issues until a recent RadTreeView update, it doesn't seem to be working in 2013 Q3 version.

Any suggestion?

Thanks in advance!

David
0
Boyan Dimitrov
Telerik team
answered on 08 Nov 2013, 03:20 PM
Hello David,

Your observations are absolutely correct and we are aware of this issue. I would like to clarify that this problem will be resolved in our upcoming service pack release scheduled for next week.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeView
Asked by
Big Q
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nikolay Tsenkov
Telerik team
Big Q
Top achievements
Rank 1
David
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or