Change Row Data With Javascript
Change Row Data With Javascript
![MightyCodder](https://secure.gravatar.com/avatar/7cdce26675a6df48f9779d0a1b44618c/?default=https%3A%2F%2Fvanillicon.com%2F7cdce26675a6df48f9779d0a1b44618c_200.png&rating=g&size=120)
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