How to Select Multiple Items Without Holding the Ctrl Key

Thread is closed for posting
1 posts, 1 answers
  1. Answer
    Telerik Admin
    Telerik Admin avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 04 Sep 2009 Link to this post


    RadControls for ASP .NET AJAX version

    2008.1.415 +
    .NET version

    2.0 and later

    Visual Studio version

    2005 and later
    Programming language

    Browser support

    all browsers supported by RadControls for ASP .NET AJAX

    Sometimes you may want to enable users to select multiple RadGrid items with the mouse without the need to hold the Ctrl key (by default this is required, similarly to the Windows Explorer behavior). Here is how to do it.


    <asp:Button ID="Button1" runat="server" Text="Deselect all items" 
        OnClientClick="return DeselectItems()" /> 
    <br /><br /> 
        <ClientSettings EnableRowHoverStyle="true"
            <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /> 
            <ClientEvents OnRowDeselecting="MyRowDeselecting" /> 


    var buttonDeselectFlag = false
    function MyRowDeselecting(sender, args) 
        if (!buttonDeselectFlag) 
    function DeselectItems() 
        buttonDeselectFlag = true
        var grid = $find("<%= RadGrid1.ClientID %>"); 
        buttonDeselectFlag = false
        return false

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.