Drag and Drop

Drag and Drop

mrmiket3mrmiket3 Posts: 1Questions: 0Answers: 0
edited February 2012 in General
When using 2 tables... Is it possible to drag a record from table1 to table2?

Thanks.
Mike

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Yes it is perfectly possible, but the code to do it isn't part of DataTables (i.e. it won't work out of the box) - you would need to write a little code to do it. The basic way of doing it would be to get the data for the row that was clicked on ( fnGetData ) then clone the TR element so you can move it around visually with the mouse, and then finally when released on another table use fnAddData to add it to the other table (and optionally fnDeleteRow to remove it from the old table!).

    Allan
This discussion has been closed.