(from mail conversation)
Use case is: a FIXGRID has a PERSISTID - this means: its sort status (and columns sequence and column widths) will be saved per user.
When you load the grid with data at point of time the grid is built up and them select the first item...:
Code:
FIXGRIDListBinding<...> m_grid = new FIXGRIDListBinding();
...
...
m_gird.getItems().add(...);
m_gird.getItems().add(...);
m_gird.getItems().add(...);
m_gird.getItems().add(...);
...
m_grid.selectItem(0);
...then the grid will not show the first item - because the sorting is applied during the build up.
You need to be part of the build-up processing. There are two way:
Code:
FIXGRIDListBinding<GridItem> m_grid = new FIXGRIDListBinding<GridItem>()
{
@Override
public void initialize()
{
super.initialize();
selectItem(0);
}
};
or (since 20220110):
Code:
m_grid.addConfiguredByLayoutListener(new IConfiguredByLayoutListener()
{
@Override
public void onInitializationByLayoutFinished()
{
m_grid.selectItem(0);
}
});
Kind regards! Björn