SMART datagrid v.1 > Classes > EditOptions

Back  Forward

DataLudi.EditOptions.editableCallback  property

Callback function which returns whether to display the editor when prepare data cell editor. 

function (index:CellIndex):*;

If explicitly return Boolean false, the editor will not be displayed. 

Defaults to null.

Getter
function editableCallback(): Function
Setter
function setEditableCallback(value: Function)
Note
Code -1
    grid.editOptions().setEditableCallback(function (index) {
        if (index.grid().getValueAt(index.rowIndex, 'qty') > 10000) {
            return false;
        }
    });
Code -2
    grid.setEditOptions({
        editableCallback: function (ndex) {
            if (index.grid().getValueAt(index.rowIndex, 'qty') > 10000) {
                return false;
            }
        }
    });
See Also
Editable & ReadOnly Overview
readOnlyCallback
editable
readOnly
DataColumn.readOnlyCallback
DataColumn.editableCallback
Examples
ReadOnly & Editable
Cell Editing