It would be really helpful to have the ability to disable client-side sorting of filter values when those values are set using the SetColumnFilterOptions action.
In our case, we have a text column that requires specific sorting logic. We already handle this sorting correctly in SQL, and we need the filter values in the Data Grid UI to respect that same order. However, the grid applies client-side sorting to the filter values, which overrides the SQL-defined order.
We were able to work around this by disabling sorting on the valueFilter instance of the column using the following JavaScript:
OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId).features.filter._filter.getColumnFilter('Product').valueFilter.sortValues = false;
While this works, it’s not ideal:
It’s difficult to discover unless you’re already familiar with the Data Grid API.
It relies on internal/private APIs, which makes it fragile and not future-proof.
It would be great if SetColumnFilterOptions had an input such as DisableSorting (or something similar) that when set to true, it essentially does the same as the JavaScript above, allowing developers to easily preserve server-defined sorting