jediting only one column
jediting only one column
good day...
here's my code...
[code]
$(document).ready(function() {
oReserveTable = $('#tableReservations').dataTable( {
bProcessing": true,
"bServerSide": true,
"sAjaxSource": "Reserve_processing.php",
"fnDrawCallback": function () {
$('#tableReservations tbody td').editable( 'editable_ajax.php', {
"callback": function( sValue, y ) {
oReserveTable.fnDraw(true);
},
"height": "14px"
} );
}
});
});
[/code]
now, to which part of my code shall i place the code show below so that only the 9th column is editable..
[code]$('td:eq(8)', oReserveTable.fnGetNodes()).editable;[/code]
and also... along with the current cell selected/edited, how may i post additional field so i could properly design my editable_ajax.php?
thank you in advance and more power to this wonderful plugin..
here's my code...
[code]
$(document).ready(function() {
oReserveTable = $('#tableReservations').dataTable( {
bProcessing": true,
"bServerSide": true,
"sAjaxSource": "Reserve_processing.php",
"fnDrawCallback": function () {
$('#tableReservations tbody td').editable( 'editable_ajax.php', {
"callback": function( sValue, y ) {
oReserveTable.fnDraw(true);
},
"height": "14px"
} );
}
});
});
[/code]
now, to which part of my code shall i place the code show below so that only the 9th column is editable..
[code]$('td:eq(8)', oReserveTable.fnGetNodes()).editable;[/code]
and also... along with the current cell selected/edited, how may i post additional field so i could properly design my editable_ajax.php?
thank you in advance and more power to this wonderful plugin..
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
oTable = $('#tableReservations').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "Reserve_processing.php",
"fnDrawCallback": function () {
$('td:eq(8)', this.fnGetNodes()).editable( 'editable_ajax.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
alert( 'DataTables has redrawn the table' );
},
"height": "14px"
} );
}
});
});
[/code]
this may help newbs like me in the future though :)