jediting only one column

jediting only one column

tron52tron52 Posts: 6Questions: 0Answers: 0
edited December 2013 in General
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..

Replies

  • tron52tron52 Posts: 6Questions: 0Answers: 0
    hehehehe got this one again... sorry :)

    [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 :)
This discussion has been closed.