using editable dataTable, and I'm able to edit the data on the first row of my table (last two columns). why are the other rows not editable? I'm expecting all rows for the last two columns to be editable.
I have tried assigned class="editable" to the table row tag, but that doesn't change the result. in the code below, i have no class assigned to the table row tag.
here is the debug link: http://debug.datatables.net/ahigal
jquery (in $(document).ready scope) :
php:
I have tried assigned class="editable" to the table row tag, but that doesn't change the result. in the code below, i have no class assigned to the table row tag.
here is the debug link: http://debug.datatables.net/ahigal
jquery (in $(document).ready scope) :
var oTable = $('#myTable').dataTable( { bFilter: false, sPaginationType: 'full_numbers', <!-- bProcessing: true, --> bServerSide: true, bJQueryUI: true, fnDrawCallback: function( oSettings ) { alert( 'DataTables has redrawn the table' ); } }); $('.editable', oTable.fnGetNodes()).editable( 'editable_ajax.php', { callback: function( sValue, y ) { var aPos = oTable.fnGetPosition( this ); oTable.fnUpdate( sValue, aPos[0], aPos[1] ); <!-- this is value, row and column --> }, submitdata: function ( value, settings ) { return { row_id: this.parentNode.getAttribute('id'), column: oTable.fnGetPosition( this )[2] }; }, height: '14px' } );
php:
echo '<table cellspacing="0" id="myTable">'; echo '<thead><tr><th>Key</th><th>Store</th><th>Date</th><th>Group</th><th>Position</th><th>Category</th><th>Lane 3</th></tr></thead>'; foreach($page_data as $key => $row){ echo sprintf('<tbody><tr id=%s><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="editable">%s</td><td class="editable">%s</td></tr></tbody>', $key, //this is for the row id $key, //display key $row['StoreNumber'], $row['LaneDate'], $row['LaneGroup'], $row['LanePosition'], $row['Category'], $row['Lane3']); } echo '</table>';