Declined
Last Updated: 06 Mar 2024 17:00 by ADMIN
Fabien
Created on: 06 Mar 2024 15:22
Category: Grid
Type: Bug Report
0
Grid multiple selection resets when clicking on something else than the checkbox

Greetings,

When using single selection mode, a row can be selected either by clicking the checkbox or by clicking on the rest of the row. There is no difference at all. Now, let's say I have a grid with multiple selection mode enabled, e.g.:

<TelerikGrid Data="listOfFoos" SelectionMode="GridSelectionMode.Multiple">
    <GridColumns>
        <GridCheckboxColumn SelectAll="true" SelectAllMode="GridSelectAllMode.All"  />
        <GridColumn Field="@nameof(Foo.Name)" Title="Name" />
    </GridColumns>
</TelerikGrid>

public class Foo { public string Name { get; set; } }

public List<Foo> listOfFoos = [ new Foo{Name="First"}, new Foo{Name="Second"}, new Foo{Name="Third"} ];


When we click an unselected row, the behavior varies depending on where we click exactly:

  • if we click on the checkbox of the unselected row, the unselected row becomes selected. Previously selected rows are still selected. Everything is fine.
  • if we click on the unselected row but not on the checkbox (e.g. on another column), the unselected row becomes selected but previously selected rows are unselected.

This notably makes multiple selection impossible if we click on the row but not on the checkbox and gives the impression we are using single selection mode. It is especially strange if we consider the existence of the CheckBoxOnlySelection parameter of <GridCheckboxColumn> whose name suggests we can select using the rest of the row by default.

1 comment
ADMIN
Dimo
Posted on: 06 Mar 2024 17:00

Hello Fabien,

The behavior you are describing is expected for the multiple selection mode with a GridCheckboxColumn. When you click on a row outside a checkbox, the checkbox column does not participate in the selection algorithm, so all previous rows are unselected.

That's why we implemented CheckBoxOnlySelection, which requires users to only click the checkboxes (when set to true).

In summary, to select multiple / additional rows, users can:

  • Click on a checkbox to select or unselect one row.
  • Click somewhere else while holding Ctrl to select or unselect one row.
  • Child somewhere else while holding Shift to select a range or rows.

Let me know if you have any further questions or concerns.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!