How to make a table cell non-editable in this function
How to make a table cell non-editable in this function
Some cell have to be read-only and others editable.
Table is created:
oTable = $('#tableau').dataTable({
"aaData": dataSource["aaData"], // dataSource = {"aaData": []};
"aoColumns": tableColumns,
"bFilter":false,
"bSort":false,
"sScrollX": "100%",
"bScrollCollapse": true,
"bInfo":false,
"bLengthChange":true,
"bPaginate":false
});
and then applied the jEditable handlers to the table:
$('td', oTable.fnGetNodes()).editable( saveValue, {
"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",
"placeholder" : ''
});
Is there a way to customized the handler so non-editable cells are left as read-only? The condition for a cell to be editable or not is saved in the object for the cell created and inserted in the array used to define the table, dataSource["aaData"].
I've been trying to figure out how to make it work based on other examples with no success.
Any suggestion? Or another approach?