Hi Isomorphic,
in this sample (v14.0p_2025-07-19), when you show the filterRow of the ListGrid via right-click and then open the SetFilterItem for the Category-field, you notice that it is not sorted - different to the SetFilterItem for the Category-field in the search form above.
I wondered why that is and started investigating and noticed that the ListGrid-SetFilterItem actually uses the ListGrid DataSource - other than the SearchForm SetFilterItem, which uses supplyCategory (cool that this is automatic - I assume because of the foreignKey in the .ds.xml).
I then noticed the groupBy: category in the RPCRequest-Tab of the Developer Console.
It also includes the ListGrid-criteria in that request, so that I will always only see Category-entries that are actually in my filtered dataset - pretty cool.
My improvement suggestion is to also send an automatic sortBy with the groupBy. This makes the end user experience better and as the database has to already do a GROUP BY, a ORDER BY does not make the request any slower (different to e.g. a ComboBoxItem, where there is no grouping involved).
Depending on DB and count of unique values for the groupBy the order of entries might actually change otherwise - hard to see why for an end user. Of course the developer can define a sort - but in this case the sort by the groupedBy-field is the only useful order.
So IMHO there are only wins by doing this automatically as a default.
Best regards
Blama
in this sample (v14.0p_2025-07-19), when you show the filterRow of the ListGrid via right-click and then open the SetFilterItem for the Category-field, you notice that it is not sorted - different to the SetFilterItem for the Category-field in the search form above.
I wondered why that is and started investigating and noticed that the ListGrid-SetFilterItem actually uses the ListGrid DataSource - other than the SearchForm SetFilterItem, which uses supplyCategory (cool that this is automatic - I assume because of the foreignKey in the .ds.xml).
I then noticed the groupBy: category in the RPCRequest-Tab of the Developer Console.
It also includes the ListGrid-criteria in that request, so that I will always only see Category-entries that are actually in my filtered dataset - pretty cool.
My improvement suggestion is to also send an automatic sortBy with the groupBy. This makes the end user experience better and as the database has to already do a GROUP BY, a ORDER BY does not make the request any slower (different to e.g. a ComboBoxItem, where there is no grouping involved).
Depending on DB and count of unique values for the groupBy the order of entries might actually change otherwise - hard to see why for an end user. Of course the developer can define a sort - but in this case the sort by the groupedBy-field is the only useful order.
So IMHO there are only wins by doing this automatically as a default.
Best regards
Blama
Comment