Datatables update and save single cell on click
Datatables update and save single cell on click
I'm able to update, using fnupdate, a single cell on click using this code:
[code]
$(document).ready(function() {
$('#example').on( 'click', 'td:nth-child(12)', function () {
oTable = $('#example').dataTable();
var aPos = oTable.fnGetPosition( this );
alert(aPos);
oTable.fnUpdate( 'new data', aPos[0], aPos[1] );
} );
} );
[/code]
What I need is to save this new change or toggle in db, but its not working with the above code, is there any way to reach it?
[code]
$(document).ready(function() {
$('#example').on( 'click', 'td:nth-child(12)', function () {
oTable = $('#example').dataTable();
var aPos = oTable.fnGetPosition( this );
alert(aPos);
oTable.fnUpdate( 'new data', aPos[0], aPos[1] );
} );
} );
[/code]
What I need is to save this new change or toggle in db, but its not working with the above code, is there any way to reach it?
This discussion has been closed.
Replies
Allan
[code]
editor.edit( TRnode, null, null, false );
editor.set( 'name', 'Updated name' );
editor.set( 'access', 'Read only' );
editor.submit();[/code]
TRnode should be "this"?
Allan