Hi Isomorphic,
I have a suggestion similar to my New API suggestion: ListGridField.setSortField(String sortField)-suggestion.
When grouping ListGrids, you should add the groupBy field(s) as prefix to the sortFields. This should be done iff no GroupValueFunction is applied (and the bare value is used).
You could also add a declarative ds.xml field-setting like the suggested "sortByField" from the thread above (then named "groupByField").
Reason:
When doing so, you can guarantee that a group that is shown as "finished" by the fact that a new group starts, is really finished.
Therefore you can drop the ListGrid.setGroupByMaxRecords()-setting in this cases, as all sorting is already done by the server.
I'm not sure how this should be handled when a GroupTitleRenderer is used, because the position of every group is dependent on its title. This can't be done without client side logic, then, most likely leading to the same problems that made you introduce setGroupByMaxRecords().
Do you think this is a good enhancement (it has no priority for me, but I thought about it again after reading this post)?
Best regards,
Blama
I have a suggestion similar to my New API suggestion: ListGridField.setSortField(String sortField)-suggestion.
When grouping ListGrids, you should add the groupBy field(s) as prefix to the sortFields. This should be done iff no GroupValueFunction is applied (and the bare value is used).
You could also add a declarative ds.xml field-setting like the suggested "sortByField" from the thread above (then named "groupByField").
Reason:
When doing so, you can guarantee that a group that is shown as "finished" by the fact that a new group starts, is really finished.
Therefore you can drop the ListGrid.setGroupByMaxRecords()-setting in this cases, as all sorting is already done by the server.
I'm not sure how this should be handled when a GroupTitleRenderer is used, because the position of every group is dependent on its title. This can't be done without client side logic, then, most likely leading to the same problems that made you introduce setGroupByMaxRecords().
Do you think this is a good enhancement (it has no priority for me, but I thought about it again after reading this post)?
Best regards,
Blama
Comment