I would like to enable the grid to have drag and drop rows, that will allow the grid rows to be ordered very dynamically. Is there away to do this?
Well, I have found solution. May be it will be helpfull for someone else:
We just need to recalculate height:
start: function (evt, ui) {
ui.placeholder.height(ui.item.height());
...
Hello,
I have tried your solution and it works fine :)
But I noticed one issue. It works weird when we are switching-on Selection feature and when we are trying to drag selected row. Do you have any ideas about the reason?
Thanks,
Aliaksei
I can access the record by findRecordByKey and apply the same changes like sorting order to the datasource items, but unfortunately I can't sort this datasource array.
Based on your recommendation I have tried to implement the drag and drop of rows.
Primarly everything works fine. I have been also able to update the table cells to reflect the new sorting order.
But I have found a problem, which happens after applying a updateRow command. The other table cells were refreshed with the old content.
As far as I have understand this happens because the underlying datasource must be also updated.
The question is how can I achieve this?
Another issue I've noticed is that after dragging rows, the zebra striping does not get refreshed. So I end up with adjacent rows with the same background color. Is there a way to refresh the zebra striping on the grid after dragging rows?