1

First of all, I can't post jsfiddle as a link in my question, that's why i posted link as normal text.

I designed a user interface with two jQuery DataTable.

First table loads with initial data and second table loads with no data.

When the user clicks on a row or selecting a raw and click on move button, i just transferring data from first table to second and vice versa.

Also i am maintaining two array for final data in first and second table, to submit to the server.

This is the UI - jsfiddle.net/viswa317/d7R7c/3/embedded/result/

This is the code - jsfiddle.net/viswa317/d7R7c/3/

Problem is that removed row or tr tag is coming back, just play with that ui you can understand what i mean.

I am removing user selected row or tr tag using Jquery remove() function, but when i move data from second to first table, Already removed data in first table is coming back

Viswa
  • 3,211
  • 5
  • 34
  • 65

2 Answers2

2

My bad, using Jquery remove function not really removing the row. It just removing the tr tag as we expect from jquery, so i am using DataTabel fnDeleteRow function. It's working perfectly.

For the code and ui use the same links i posted in question, I updated with working code.

Cheers.

Viswa
  • 3,211
  • 5
  • 34
  • 65
0

Could you possibly not use the jquery sortable plugin? For example here

Then all you have to do is connect the two tables and you have drag and drop functionality. Although this example uses lists and not tables, This is what is possible

Community
  • 1
  • 1
Ebbs
  • 1,030
  • 3
  • 20
  • 38