SMART datagrid v.1 > Classes > DataColumn
Callback function which returns read-only state of editor when preparing data cell editor.
If explicitly return Boolean true, you will not be able to update the value of editor.
Defaults to null.
column.setReadOnlyCallback(function (index) {
if (grid.getValueAt(index.rowIndex, 'qty') > 10000) {
return true;
}
});
var columns = [{
name: 'colRate',
readOnlyCallback: function (index) {
if (grid.getValueAt(index.rowIndex, 'qty') > 10000) {
return false;
}
}
},
...
];
grid.setColumns(columns);