When changing the content of my DataGrid I would like the grid to
scroll back to the top but it does not happen automatically.
I have two grids side by side (see
http://code.google.com/p/bug4j/ )
and when the selection changes on the left, the content changes on the
right.
I found a workaround but it isn't pretty:
final DataGrid<BugHit> ret = new DataGrid<BugHit>(PAGE_SIZE){
@Override
public void setRowData(int start, List<? extends BugHit>
values) {
final HeaderPanel headerPanel = (HeaderPanel)
getWidget();
final ScrollPanel scrollPanel = (ScrollPanel)
headerPanel.getContentWidget();
scrollPanel.scrollToTop();
super.setRowData(start, values);
}
};
1) Did I miss something?
2) Should I file a bug?
3) What is the bug? a) the DataGrid should expose the ScrollPanel or
b) DataGrid it should scroll automatically to the top?