question about multi-row select + row click

3 posts, 0 answers
  1. Kelly
    Kelly avatar
    55 posts
    Member since:
    Nov 2007

    Posted 19 Jan 2009 Link to this post

    I have a RadGrid with AllowRowSelect="true", AllowMultiRowSelection="true", and a GridClientSelectColumn.

    When I select items using the checkbox, multi-row selection works great. But when I select items by clicking on them, it undoes all of my previous selections!  This would be really inconvenient for the user because if they miss the checkbox by just 1px all of their selecting work will be gone.  And if the user has scrolled on the page to make the final selection, they won't even know that everything else has been un-selected.

    Is there a setting I can change so that clicking a row adds to the selection instead of resetting to select just that item? Or alternatively, could I disable the "select on row click" functionality and force them to use the checkbox?

    Thanks in advance. Here's my code:

                <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AllowFilteringByColumn="false" 
                    AutoGenerateColumns="False" AllowMultiRowSelection="True" DataSourceID="DrugDataSource">  
                        <Selecting AllowRowSelect="true" /> 
                    <MasterTableView AllowNaturalSort="false" DataKeyNames="DrugID" GridLines="None">  
                            <telerik:GridTemplateColumn DataField="BrandName" HeaderText="Brand Name" UniqueName="BrandName" 
                                AutoPostBackOnFilter="true" AllowFiltering="true" SortExpression="BrandName">  
                                <HeaderStyle Width="35%" /> 
                                    <%# Eval("BrandName") %></ItemTemplate>  
                                    <span class="mandatory">*</span> 
                                    <asp:TextBox ID="txtBrandName" runat="server" Text='<%# Bind("BrandName") %>'></asp:TextBox> 
                                    <asp:RequiredFieldValidator ID="ReqBrandName" runat="server" ControlToValidate="txtBrandName" 
                                        ErrorMessage="<div>Please enter a brand name.</div>" CssClass="errorstatus" Display="Dynamic"></asp:RequiredFieldValidator> 
                            <telerik:GridTemplateColumn DataField="ScientificName" HeaderText="Generic Name" 
                                AutoPostBackOnFilter="true" AllowFiltering="true" UniqueName="ScientificName" 
                                <HeaderStyle Width="35%" /> 
                                    <%# Eval("ScientificName") %></ItemTemplate>  
                                    <span class="mandatory">*</span> 
                                    <asp:TextBox ID="txtScientificName" runat="server" Text='<%# Bind("ScientificName") %>'></asp:TextBox> 
                                    <asp:RequiredFieldValidator ID="ReqScientificName" runat="server" ControlToValidate="txtScientificName" 
                                        ErrorMessage="<div>Please enter a scientific name.</div>" CssClass="errorstatus" 
                        <RowIndicatorColumn Visible="False">  
                            <HeaderStyle Width="20px" /> 
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Jan 2009 Link to this post

    Hello Kelly,

    You can go through the following code library submission which demonstrates on how to select grid rows only when a GridClientSelectColumn checkbox is clicked.
    ClientSideSelectColumn - Disallow other selection


  3. DevCraft R3 2016 release webinar banner
  4. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 03 Feb 2009 Link to this post

    Doesn't seem to work for me completely.
    The row is still getting highlighted.
    Each row that I click on is subsequently highlighted.
Back to Top