Change Row Data With Javascript
Change Row Data With Javascript
MightyCodder
Posts: 3Questions: 0Answers: 0
I am looking to be able to often change row data with JavaScript depending on results supplied by a socket connection.
I was just wondering what the best way to do this without compromising too much performance.
Should I delete the whole table, then repopulate it with the newly supplied array?
I was just wondering what the best way to do this without compromising too much performance.
Should I delete the whole table, then repopulate it with the newly supplied array?
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable();
oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // Row
} );
[/code]
You can see this working in inline-editing.
Thanks to Allan for putting this together