GridClientSelectColumn - Clicking outside of checkbox will clear all checked checkbox on other rows

1 Answer 168 Views
Grid
Sheng
Top achievements
Rank 1
Iron
Iron
Sheng asked on 29 Apr 2022, 02:25 PM

When using GridClientSelectColumn, ClientSettings.Selecting.AllowRowSelect must be set to "True". In this case, if user need to check on multiple checkboxes but accidentally clicking outside of a checkbox, then all checked checkboxes on other rows will be checked off. This is annoying. Is there a way to avoid this when using GridClientSelectColumn?

1 Answer, 1 is accepted

Sort by
1
Accepted
Attila Antal
Telerik team
answered on 04 May 2022, 10:44 AM

Hi Sheng,

In addition to enabling the Row selection, to allow the users to select one or more items, the AllowMultiRowSelection property has to be set to True. This will enable selection, which can be done simply by clicking on a Row.

If you add a GridClientSelectColumn to RadGrid, you will still be able to select the Rows by clicking on them. To limit selecting rows only by checkboxes, you can set the UseClientSelectColumnOnly property to True.

This way, the user will be able to select multiple rows, but only using the GridClientSelectColumn

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true">
    <ClientSettings>
        <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
    </ClientSettings>
</telerik:RadGrid>

Give this a try and let us know if you have any difficulties.

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Sheng
Top achievements
Rank 1
Iron
Iron
commented on 04 May 2022, 05:30 PM

Thank you Attila! Why didn't I find the simple solution? I created a Template column to do the same job. That's silly.
Tags
Grid
Asked by
Sheng
Top achievements
Rank 1
Iron
Iron
Answers by
Attila Antal
Telerik team
Share this question
or