doing editable grids
doing editable grids
emelianenko
Posts: 18Questions: 0Answers: 0
Hello everybody
I tried to reproduce the example for the editable grids on server side processing.
hmm, basically copied and pasted but ..i dont know if the two extra pieces of code have to merge inside one script or they are to go consecutive ...
and came up with an empty grid, while, I do get the grid alright if I dont include the editable code
[code]
$(document).ready(function() {
/* Init DataTables */
var oTable = $('#ejemplo').dataTable();{
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "server_processing.php"
/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( '../examples_support/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]
};
},
"height": "14px"
} );
} );
$(document).ready( function() {
$('#ejemplo').dataTable( {
"fnDrawCallback": function() {
alert( 'DataTables has redrawn the table' );
}
} );
} )
[/code]
any hint as to how that should be "pasted" correctly ?
thank you
I tried to reproduce the example for the editable grids on server side processing.
hmm, basically copied and pasted but ..i dont know if the two extra pieces of code have to merge inside one script or they are to go consecutive ...
and came up with an empty grid, while, I do get the grid alright if I dont include the editable code
[code]
$(document).ready(function() {
/* Init DataTables */
var oTable = $('#ejemplo').dataTable();{
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "server_processing.php"
/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( '../examples_support/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]
};
},
"height": "14px"
} );
} );
$(document).ready( function() {
$('#ejemplo').dataTable( {
"fnDrawCallback": function() {
alert( 'DataTables has redrawn the table' );
}
} );
} )
[/code]
any hint as to how that should be "pasted" correctly ?
thank you
This discussion has been closed.