Datagrid is scrolling up on data refresh
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 update the data provider of the grid locally).
- 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.
精彩评论