SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.editorCallback  property

Return editor id for editing cells of index location among cell editors registered by GridBase.registerCellEditors

function (index:CellIndex):String;

If return editor ID which is not registered, it will use the editor set in column. 

Defaults to null.

Getter
function editorCallback(): Function
Setter
function setEditorCallback(value: Function)
Code -1
    grid.registerCellEditors([{
        id: "line"
    }, {
        id: "list2",
        type: "list",
        values: ["abc", "def", "xyz"]
    }]);
    
    var columns = [{
        name: 'colAddr',
       "editorCallback": function (index) {
            var v = index.rowIndex % 3
            if (v == 1) return "line";
            if (v == 2) return "list2";
        }
        ...
    },
    ...
    ];
    grid.setColumns(columns);
See Also
GridBase.registerCellEditors
GridBase.unregisterCellEditors
editor
Examples
Dynamic Editor
Text Editors
List Editors