ajax source doesnt add ID attribute to , so JEditable doesnt work.
ajax source doesnt add ID attribute to , so JEditable doesnt work.
jeff_porter
Posts: 4Questions: 0Answers: 0
Hi,
ajax source doesnt add ID attribute to , so JEditable doesnt work.
Is this a know issue?
Thanks
Jeff Porter
ajax source doesnt add ID attribute to , so JEditable doesnt work.
Is this a know issue?
Thanks
Jeff Porter
This discussion has been closed.
Replies
You can add the id with a callback function of your own. Probably most suitable would be the fnRowCallback function.
http://datatables.net/ref
[code]
// note: this is off the top of my head, haven't tested it.
$(document).ready(function() {
$('#example').dataTable( {
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
// assuming ID is in column 0
$(nRow).attr("id", aData[0]);
return nRow;
}
} );
} );
[/code]