Ignite UI for Angular is a complete library of Angular-native, Material-based Angular UI components with the fastest grids and charts, Pivot Grid, Dock Manager, Hierarchical Grid, and more.
Is your feature request related to a problem? Please describe.
Customers using custom column formatters usually want to sort based on them. Currently the grid sorts by the underlying column values. For filtering on the other hand, it suffices to assign an instance of the FormattedValuesFilteringStrategy to achieve this.
The existing approach to override this for sorting is to implement the ISortingStrategy interface, as in this sample.
This is a bit lengthy and involves extending the DefaultSortingStrategy just to modify the compareObjects function logic.
Moreover, further workarounds have to be implemented if users would like to reuse this custom strategy on multiple formatted columns.
As a side note, this approach is also merely mentioned in the docs here and since a demo is lacking is a question that is often brought up in support cases.
Describe the solution you'd like
Expose a FormattedValuesSortingStrategy, for example.
Is your feature request related to a problem? Please describe.
Customers using custom column formatters usually want to sort based on them. Currently the grid sorts by the underlying column values. For filtering on the other hand, it suffices to assign an instance of the
FormattedValuesFilteringStrategy
to achieve this. The existing approach to override this for sorting is to implement the ISortingStrategy interface, as in this sample. This is a bit lengthy and involves extending theDefaultSortingStrategy
just to modify thecompareObjects
function logic. Moreover, further workarounds have to be implemented if users would like to reuse this custom strategy on multiple formatted columns.As a side note, this approach is also merely mentioned in the docs here and since a demo is lacking is a question that is often brought up in support cases.
Describe the solution you'd like
Expose a
FormattedValuesSortingStrategy
, for example.Describe alternatives you've considered
Additional context