SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onEditSearch  event

It will be fired when SearchCellEditor requests the items with which will fill the list box.
 In this event handler, it will call fillEditSearchItems to transfer the items. 

function onEditSearch (grid: GridBase, index: CellIndex, key: String);
Returns
Void
Parameters
grid - GridBase.
index - CellIndex.
key - String.
Code -1
    var _names = ['aaa', 'bbb', ....];
    grid.onEditSearch = function (grid, index, text) {
        var items = _names.filter(function(str) {
            return str.indexOf(text) == 0;
        });
        grid.fillEditSearchItems(index.column, text, items);
    };
See Also
SearchCellEditor
fillEditSearchItems
Examples
Search Cell Editor