Apply editable to specific rows

Apply editable to specific rows

mcnillmcnill Posts: 1Questions: 0Answers: 0
edited April 2013 in Plug-ins
Hi.


I add jeditable functionality to my table via fnDrawCallback. Have to work with big amounts of data and after I apply jeditable render takes about 5 times more time.
I don't need editting for all rows, but for those that have specific value in one of the columns.

Is there a way to limit amount of editable rows depending on the value of another column?

Here is fnDrawCallback code:
[code]
"fnDrawCallback": function() {
var sOldValue;
var sNewCellValue;
$('#Example tbody td.edit').editable("Example/UpdateData", {
"event": "dblclick",
"method": "POST",
"callback": function(sValue, settings) {
var aPos;
if (sNewCellValue == sValue) {
aPos = oTable.fnGetPosition(this);
oTable.fnUpdate(sValue, aPos[0], aPos[2]);
} else {
aPos = oTable.fnGetPosition(this);
oTable.fnUpdate(sOldValue, aPos[0], aPos[2]);
}
},
"submitdata": function(value, settings) {
sOldValue = value;
sNewCellValue = $("input,select", $(this)).val();

var aPos = oTable.fnGetPosition(this);
var aData = oTable.fnGetData(aPos[0]).WaybillId;

return {
"id": aData,
"columnPosition": aPos[2],
};
},
"onerror": function() {
alert("Cell cannot be updated(Server error)");
},
"height": "14px"
});
}
[/code]
This discussion has been closed.