Hi Bryntum team,
I’m currently working with a data store where each record contains both a serviceItemTypeId and a corresponding serviceItemTypeName.
Here’s a simplified version of my setup:
fields: ['id', 'name', 'description', 'serviceItemTypeId', 'serviceItemTypeName', 'quantity'],
data: transformedItems.map(item => ({
...item,
serviceItemTypeId: item.serviceItemTypeId,
quantity: 1})),
groupers: [{
field: 'serviceItemTypeId',
ascending: true}],
sorters: [{ field: 'name', ascending: true }]
What I’d like to achieve is the following:
The data should group by serviceItemTypeId (so all items of the same type stay together).
The group header should display the serviceItemTypeName instead of the ID.
The groups should be sorted alphabetically by serviceItemTypeName, not by the numeric ID.
I’ve tried using groupers with different field combinations, but it always seems to base the grouping and sorting on the same field.
Is there a recommended way to group by an ID field but display and sort the group using another related field?
Thank you!