Hi,
I have 2 columns in the grid which are merged. I am also enabling the Row Reordering. After row reordering, the cell merge is reset to normal rows.
I want to manually re-sort the grid based on both the columns after row reordering in order to display the cell merge. How to achieve this in the change event?
Please refer the below example.
const grid = new Grid({
appendTo : targetElement,
// makes grid as high as it needs to be to fit rows
autoHeight : true,
features : {
// enable row reordering by dragging
rowReorder : true,
sort : ['surName','city'],
mergeCells: true,
},
data : DataGenerator.generateData(10),
columns : [
{ field : 'firstName', text : 'First name', width : 150, locked : true },
{ field : 'surName', text : 'Surname', width : 150, locked : true , mergeCells: true},
{ field : 'city', text : 'City', flex : 1, mergeCells: true },
{ field : 'team', text : 'Team', flex : 1 },
{ field : 'score', text : 'Score', flex : 1 },
{ field : 'rank', text : 'Rank', flex : 1 }
]
});