Update Column Data of Current Table Page
Update Column Data of Current Table Page
I have a table where all the columns but the last are populated from an array. The last column needs to be brought in more dynamically (i.e an Ajax call) as it would be too time expensive to have the server generate the data for all of the table at once. So to test things out before dealing with iteration and the ajax call I have added the following to the datatable's "drawCallback" function:
mydata=$('#table_id').DataTable().row( 1 ,{page:'current'} ).data();
mydata.push("some new data");
$('#table_id').DataTable().row( 1 ,{page:'current'} ).data( mydata );
This however affects the row containing the data from the 1th element of the array I initialized the datatable with instead of the 1th row of the current table page. What am I doing wrong? And/or is the better way to accomplish what I am trying to accomplish?