Premium support for our pure JavaScript UI components


Post by anuradha.gopal »

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 }
]
});

Post by marcio »

Hey anuradha.gopal,

Thanks for the detailed report and example, I created a ticket to fix that https://github.com/bryntum/support/issues/6429

Best regards,
Márcio


Post by anuradha.gopal »

Thanks Marcio. While we await the resolution, is there any workaround I can apply for now?


Post by tasnim »

Hi,

Don't think that there is any workaround for this. We've assigned a high-priority label to that ticket to increase the priority of the ticket.
So, we hope to have it fixed ASAP. But, can't make any promises about when it's going to be fixed.

Please subscribe to the ticket so if there is any update, it will notify you.

All the best,
Tasnim


Post by anuradha.gopal »

Would like to know the progress of this fix since it is priority for us. I understand it is marked as high priority defect, but wanted to check since there are no assignees mapped to this task.

https://github.com/bryntum/support/issues/6429


Post by marcio »

Hey anuradha.gopal,

We're still discussing this internally, but I added a note to the ticket, and will be soon checked by one of our team.

Best regards,
Márcio


Post by anuradha.gopal »

Hi,
Would like to know if there is an ETA for this activity as we need to update our stakeholders.
We appreciate even if there is a workaround for the time being. Please let us know.

Thanks


Post by alex.l »

Hi anuradha.gopal,

There is not ETA right now. The ticket has high-prio label, this means it will be fixed as soon as possible.
I've pinged our product management again about this ticket to set a milestone if possible.
You can subscribe on ticket updates to be notified about any changes.

All the best,
Alex


Post by johan.isaksson »

Hi,

You could re-apply sorters in a listener to the RowReorder features gridRowDrop event. But, likely that is not what you want to do since that would more or less render the reorder useless.

Instead I suspect that what you want is the ability to merge cells in unsorted columns? If so, I'll close the ticket and instead bump priority on https://github.com/bryntum/support/issues/5012

Best regards,
Johan Isaksson

Post by anuradha.gopal »

Hi,
What you are saying is true. However, in our case, we have 2 scenarios.

The sorting will not render the reorder useless in one of these scenarios, since we have a certain number of columns that are merged that act as a logical group. Within that group we allow the reorder to happen. Please check the example attached.

In the example, we have 2 requirements:

  1. We should be able to reorder the Chefs within each city. The grid is sorted by City and then by Food- by default. The cell merge is done by City and Food. While reordering, the Chefs will NOT be moved to another city. Therefore, the sorting remains as it is.
  2. We should also be able to reorder the entire logical set of City, Food and Chef. In this case, yes, sorting will not function.

PS:
Would like to clarify, the ticket you have attached is not for Grid but for the Scheduler. Does the solution hold good for Grid as well?

Attachments
Capture.PNG
Capture.PNG (7.74 KiB) Viewed 370 times

Post Reply