Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81677

fnUpdate with server side

$
0
0
I'm using the latest version of DataTables and I am updating some data on the server side. I do not want to re-draw the whole thing however as the information displayed is quite large. I would like to just update the row in order to show the same information on the datatable as my server.
So I have this function where data is an array returned from my server side script with the data which was entered onto the database.
function(data)
{
   if( (data[0]==DeSys.val())&&(data[1]==core.val())&&(data[2]==AD.val())&&(data[3]==Comment.val()))
  {
   console.log(rowP);
   var myvar = [' ', DeSys.val(), core.val() , AD.val(), Comment.val() , ' '];
   console.log(myvar);
   $('#cores').dataTable().fnUpdate([' ', DeSys.val(), core.val() , AD.val(), Comment.val() , ' '] , rowP ,0 , false);
   $('#cores').dataTable().fnStandingRedraw();
  }
}

I know I am passing the correct information as I have tried it with.
  
$('#cores').dataTable().fnAddData([' ', DeSys.val(), core.val(), AD.val(), Comment.val(), ' '], false);
$('#cores').dataTable().fnStandingRedraw();

and that seems to work fine.
Should my variable rowP be anything other than just the column number I am trying to update ?

I have also tried giving it the node but it doesn't help. Is there a problem because I have an image in one of my rows ?
Any help would be appreciated.
Thanks

Viewing all articles
Browse latest Browse all 81677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>