Move row from one table to another and back with different columns?

Move row from one table to another and back with different columns?

chrisgrandechrisgrande Posts: 2Questions: 2Answers: 0

I was able to get a row to move from one table to another, the issue is that the source table and destination tables have a different number of columns. Also, I need the ability to move the row back. What would be the best way to achieve this?

Answers

  • eduardo_walleneduardo_wallen Posts: 2Questions: 0Answers: 0

    I am also in need of a solution like this. Is there any chance that DataTables have already looked into it and will try to implement an API function for this, or did I miss something in the API that can achieve this? Coming back with a solution for this if I can solve it myself.

  • pratsprats Posts: 45Questions: 21Answers: 0
    edited May 2017

    Add on click function on particluar column's data to got to next page like

    $('#rd_ticket_Summary').on( 'click', 'tr td', function () {
            var d = oTable.row( this ).data();
                if($(this).hasClass("OpenTicketsCount")){ // class assign to that column
                    var trElem = $(this).closest("tr");
                    var organizationid = d.organizationid; //parameter to pass 
                    var projectid = d.projectid;    //parameter to pass         
                   $("#reportParam").val(organizationid+"_"+projectid);
                    //add href event to go to next page with parameters
                      }
                });
    
  • eduardo_walleneduardo_wallen Posts: 2Questions: 0Answers: 0

    The solution I decided to go with on this issue was to have the same amount of columns in all tables (I've only got two in my case) and then just hide the columns that are irrelevant, depending on what the table should show. Kind of a lazy fix, but in my case there wont be more than 50 rows in the list, so it's all good.

This discussion has been closed.