Check documentation for the latest version of dhtmlxSuite filterBy DHTMLX Docs

filterBy

filters Grid by mask

void filterBy(number column,string value,boolean preserve);
columnnumbera zero-based index of column
valuestringa value by which the column will be filtered
preservebooleanfilter current or initial state (false by default)

Available only in PRO Edition

Example

//filter grid by 2nd column by value "alf"
myGrid.filterBy(1,"alf");
//filter grid by 2nd column with a more complex rule
myGrid.filterBy(1,function(data){
// true - show the related row, false - hide the related row
    return   data.toString().indexOf("alf")!=-1; 
});
//filter current grid state by 3rd column by value "Omega" 
myGrid.filterBy(2,"Omega",true);

Back to top