SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.fillEditSearchItems  method

SearchCellEditor calls this method within onEditSearch event handler which requests the items to be filled in list box to fill the items of editor list. 

function fillEditSearchItems (column: DataColumn, searchKey: String, values: Array, labels: Array);
Returns
Void
Parameters
column - DataColumn.
searchKey - String.
values - Array.
labels - Array.
Code -1
    var names = [
        "a001", "a002", "a003", "b004", "b005", "c006", "c007", "c008", 
        "d009", "d010", "e011", "e012", "e013", "f014", "f015", "g016", "g017"
    ];
    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
onEditSearch
SearchCellEditor
Examples
Search Cell Editor