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

Grid navigation reset to first cell after editing.

3 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Euan
Top achievements
Rank 1
Euan asked on 14 Mar 2014, 04:24 PM
Hi,

I have the grid setup with a custom inline editor and navigation enabled.
When using tab, arrow keys or enter/return after changing the value of a cell the next cell is not selected, but it jumps to the first cell in the grid.
I can navigate through cells as expected with the editor displayed in each cell as I move but if I update a value than the selection jumps back to the first cell.

In debug I can see that the  $("#tsGrid").data("kendoGrid")._current is being reset on tab etc. but only when I have changed the value.

Any help is appreciated.

Thanks
Euan

3 Answers, 1 is accepted

Sort by
0
Euan
Top achievements
Rank 1
answered on 14 Mar 2014, 04:39 PM
Hi,

I have found that it is caused by the grid having:
save: function (e) {
  // Refresh aggregates when editing
  e.model.one("change", function () {
    gridDataSource.fetch();
  });
},
This was added based on another kendo forum post to force the datasource aggregates to be calculated dynamically as the grid is updated.

Is there a different approach that will allow the aggregates to be updated without losing the selected cell.

Thanks
Euan
0
Petur Subev
Telerik team
answered on 18 Mar 2014, 01:57 PM
Hello Euan,

I am afraid there is no way (not supported and no feasible work-around) to rebind the Grid and to persist the navigation state at the same time.

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Euan
Top achievements
Rank 1
answered on 18 Mar 2014, 03:13 PM
Thanks, I was afraid this was the case.

As the root cause is the dynamic aggregates workaround I have raised a feature request to cover my requirements:
Allow grid via datasource to show dynamically updated aggregates
Tags
Grid
Asked by
Euan
Top achievements
Rank 1
Answers by
Euan
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or