Hi,
I’m trying to open a browse screen with TreeDataGrid
from a LookupPickerField
. I want to select a specific item (leaf in a hierarchy), expand ancestors and scroll to it.
I manage to select the item like this:
@Subscribe
protected void onAfterShow(final AfterShowEvent event) {
if (null != this.hierarchieClient) {
this.hierarchieClientsTable.setSelected(this.hierarchieClient);
this.hierarchieClientsTable.scrollTo(this.hierarchieClientsTable.getSingleSelected(), DataGrid.ScrollDestination.MIDDLE);
}
}
but .scrollTo()
throw an exception (row outside of datacontainer size
). Indeed, selected row is position 388
and first level ancestors group size is 160
Best regards, Stef.