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

Problem with the RowEditEndedCommand event

1 Answer 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 27 Mar 2020, 10:44 AM
Good day.

We have a problem with the RowEditEndedCommand event.

We have a GridView with GridViewCheckBoxColumn. Also there is a checkbox in the header of this column, which allows you to check/uncheck all checkboxes.

Usually everything works fine:
1. Edit the row.
2. Click to another control (for example, click on the button or select another tab).
3. The RowEditEndedCommand event was called.

But if we add an action with a checkbox in the header to the order of actions:
1. Edit the row.
2. Click on the checkbox in the grid header.
3. Click to another control.
4. The RowEditEndedCommand event was NOT called.

We need to always call this event, but we don’t know why it doesn’t work in this case.


I am attaching a small example. Use the button to change focus and get RowEditEnded event.
https://drive.google.com/file/d/1PlAq5s2uv905-wldi7jD1r8JZx28YUwO/view?usp=sharing

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 01 Apr 2020, 08:23 AM

Hi Alex,

Thank you for the provided project.

This behavior is expected. This event will be fired when the user manually edits a cell. The CheckBox in the header is a custom control, which changes the value of a property from your business object. In this case, the cell never goes to an edit mode. Also, this event is called for one row only. This is because you can't edit multiple cells at the same time out of the box.

What I can suggest is to create a flag when the SelectAll command is executed from the CheckBox in the header. This way, you can execute the same logic as in the RowEditEndedCommand.

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or