How to multiple select node without pressing ctrl key?

6 posts, 0 answers
  1. Big Q
    Big Q avatar
    30 posts
    Member since:
    Jan 2010

    Posted 16 Nov 2010 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Nov 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 16 Nov 2010 Link to this post

    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.
  5. Big Q
    Big Q avatar
    30 posts
    Member since:
    Jan 2010

    Posted 16 Nov 2010 Link to this post

    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
  6. David
    David avatar
    5 posts
    Member since:
    Nov 2013

    Posted 06 Nov 2013 Link to this post

    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
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 08 Nov 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017