RadTreeView - Multiple Selection for IE, Chrome and FF

2 posts, 0 answers
  1. Amir
    Amir avatar
    1 posts
    Member since:
    Jan 2011

    Posted 05 Jan 2011 Link to this post

    Hello,

    I use the following code to enable multiple selection in the radtreeview. The code only works in IE and not in Chrome or FireFox. 
    Could someone help me with this issue?

    Code:

    <telerik:RadCodeBlock ID="cb1" runat="server">


            <script language="javascript" type="text/javascript">
                       
            var RadTreeIsMultiSelecting = false;
            
            function CommitTree(e)
            {
                if (!e.ctlrKey | !e.shiftKey) 
                {
                    if (RadTreeIsMultiSelecting)
                    {
                        var aMan = $find("<%= ajMan.ClientID %>");
                        aMan.ajaxRequest("RadTree");
                        
                    }
                }
            }


            function RadTreeClicked(sender, args)
            {
                RadTreeIsMultiSelecting = args._domEvent.ctrlKey | args._domEvent.shiftKey;
                var tree = $find("<%= RadTree.ClientID %>"); 
                tree.commitChanges();
            }
                
                
            </script>


        </telerik:RadCodeBlock>

  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 10 Jan 2011 Link to this post

    Hello Amir,

    RadTreeView already supports multi-selection - both using the shift and ctrl key.
    You only need to set the MultipleSelect property of RadTreeView's to true.


    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.
Back to Top