开发者

Datagrid is scrolling up on data refresh

开发者 https://www.devze.com 2023-03-26 10:43 出处:网络
Here is what is happening: I have a datagrid (which I am generating dynamically) If I select开发者_如何学运维 a row and edit it (on clicking it opens a pop up and when i save data in that, I just up

Here is what is happening:

  1. I have a datagrid (which I am generating dynamically)
  2. If I select开发者_如何学运维 a row and edit it (on clicking it opens a pop up and when i save data in that, I just update the data provider of the grid locally).
  3. As soon as data provider of datagrid is updated, the datagrid scrolls up in a way so that selected row comes at the top of datagrid.

Has someone ever crossed this issue? Thanks.


If you are using a

dataProvider.refresh();

Consider changing this to

dataProvider.itemUpdated(item);

The .refresh() sends a 'refresh' type event that causes the dataGrid to change. The itemUpdated(item) method does not dispatch this event.

0

精彩评论

暂无评论...
验证码 换一张
取 消