Drag and Drop
Drag and Drop
XstreamINsanity
Posts: 23Questions: 0Answers: 0
I see a post out there about drag and drop columns and one about drag and drop rows (not finished yet), but does anyone know of a way to drag and drop rows to other items on a page. This would essentially be the same as dragging and dropping items from a collection list into a trash bin. That's the functionality I'd like to accomplish if possible. Thanks.
This discussion has been closed.
Replies
Once you've installed take a look in jQueryUI/development-bundle/demos/draggable/default.html
It says: "Enable draggable functionality on any DOM element"
Any DOM element is pretty much all-encompassing, right? Lemme know how you get on because I'm heading in that direction with my app too.
ruzz
Regards,
Allan
The main trick with dragging/dropping when tables are involved is in the helper. You will need to develop a custom helper that clones the row you want to drag, so that it looks more realistic.
It doesn't sound like you are modifying the order of rows in the table, so you won't have to deal with reordering the DataTables internal data. Just call fnDeleteRow in your drop callback (if you are implementing a "trash can" feature, that is).
Can you post how you implemented this? I have been trying but so far, no luck.