This is a migrated thread and some comments may be shown as answers.

Should the grid Cancel button clear selected rows?

1 Answer 282 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 28 Jan 2021, 04:21 AM

We have several grids with batch editing on one page.

A user noticed if you select grid rows, then click the Cancel button for canceling edits, the selected rows are cleared.

Here's an example reproducing this issue: https://dojo.telerik.com/@joewilson0/OfiFONuF

If I set the grid to editable: false (or "inline", "incell", or "popup"), Cancel doesn't clear rows.

If I set the grid to editable: true, the Cancel button clears selected rows.

Is this expected behavior?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 29 Jan 2021, 02:06 PM

Hello Joe,

When the editable property is set to false the Grid does not support editing, thus, clicking on the toolbar Cancel button does not trigger anything underneath. Therefore, the described behavior is expected.

If you would like to persist the selection of rows upon editing, sorting, paging, etc I suggest setting persistSelection property to true:

Let me know if you have any questions.

Regards,
Nikolay
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/.

Tags
Grid
Asked by
Joe
Top achievements
Rank 2
Answers by
Nikolay
Telerik team
Share this question
or