Hi,
I have a ListGrid where a set of records is loaded via DataSource. In The dataArrivedHandler I select all records in the grid which match records from another table. The selection settings are as follows:
gridRealmDt.setSelectionType(SelectionStyle.SIMPLE);
gridRealmDt.setSelectionAppearance(SelectionAppearance.CHECKBOX);
Now I have the requirement to sort the grid based on the selection state. All selected Records should come first and then the unselected ones. The second sort criteria should be a name column.
I tried to use a sortNormilizer to modify the name value based on the selection state, unfortunately the sortNormilizer is only called once before I programmatically set the selection state. Is there a way to get the sortNormalizer called every time selection changes?
Or maybe is there a better way of implementing such a sort order?
Thanks
Martin
I have a ListGrid where a set of records is loaded via DataSource. In The dataArrivedHandler I select all records in the grid which match records from another table. The selection settings are as follows:
gridRealmDt.setSelectionType(SelectionStyle.SIMPLE);
gridRealmDt.setSelectionAppearance(SelectionAppearance.CHECKBOX);
Now I have the requirement to sort the grid based on the selection state. All selected Records should come first and then the unselected ones. The second sort criteria should be a name column.
I tried to use a sortNormilizer to modify the name value based on the selection state, unfortunately the sortNormilizer is only called once before I programmatically set the selection state. Is there a way to get the sortNormalizer called every time selection changes?
Or maybe is there a better way of implementing such a sort order?
Thanks
Martin
Comment