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?
Hi,
Currently there is no such feature in igGrid. You can try to instantiate jQuery UI Sortable on the grid tbody element, but then you'll need to implement some custom logic in order to save the new row index in the grid.
Hope this helps,Martin PavlovInfragistics, Inc.
I tried doing that but it does not work. I added these two lines in the jquery window ready function. Even tried putting it in the $.ig.loader function, but that does not work as well. Please assist. We have a need for this functionality and any help will be appreciated. Please respond to me at biren.ajmera@kochind.com as I'm not sure what email address this account is setup with.
$("#igGrid tbody").sortable(); $("#igGrid tbody").disableSelection();
Hello Kstitdeveloper,
Attached you can find a working sample demonstrating rows drag and drop.
Best regards,Martin PavlovInfragistics, Inc.
Thanks Martin. That was very quick. However I do have a couple of questions. I am using the MVC style grid rendering instead of JS. So my grid declaration is like
@Html.Infragistics.Grid(Model).....
How can I hook up the RowsRendered event of the grid and also I need some js function to trigger every time a row position is changed after dragging. Can you please add those features in your sample code? Thanks a bunch for your excellent support!
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?