ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

UI Grid and Angular DragDrop

Open inviolablegenesis opened this issue 11 years ago • 7 comments

can i have the rows have drag and drop functionality? the rows will be dragged and dropped to an outside element (not another grid, this time it's just a container).

dragdrop: https://github.com/codef0rmer/angular-dragdrop

by the way, this is not reordering the grid.

inviolablegenesis avatar Aug 18 '15 03:08 inviolablegenesis

Did you work out how to do this? I am after doing the same I was using ng-grid and got that working but after upgrading to ui-grid I cannot get it to work

cjp666 avatar Sep 25 '15 14:09 cjp666

@cjp666 I added a directive for the cell row. This directive is added in "rowTemplate" and in that row, I added the drag and drop options.

inviolablegenesis avatar Sep 29 '15 12:09 inviolablegenesis

thanks. I will give it a try

cjp666 avatar Sep 29 '15 12:09 cjp666

I have tried what you suggested but it appears to only drag within the ui-grid, I can't seem to get it to drag out of the grid and drop where I want it, any ideas will be much appreciated

http://plnkr.co/edit/Gwrw9v?p=preview

cjp666 avatar Oct 02 '15 09:10 cjp666

@cjp666 you can add appendTo: 'html' in data-jqyoui-options.

Closing this issue now because it is now working.

inviolablegenesis avatar Oct 08 '15 06:10 inviolablegenesis

Excellent! Thanks!!

cjp666 avatar Oct 08 '15 08:10 cjp666

Hi, I am trying to drop a row onto another row, but before the drop take place and changes the order, i want to do some check between the two rows. But it has the event "rowDropped" in which the order is already changed. Please suggest me which is the best way to do checks before the order changes and if the check fails then I need to cancel the re-ordering. Thanks

manojchoubisa avatar Jan 22 '18 06:01 manojchoubisa