SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.rowFilter  property

RowFilter object which specifies filter Expression or callback function to only get data rows meeting the conditions when organizing grid row model list from DataSet

You can specify by string or function, and it will be specified by RowFilter.expression and callback properties of existing property object respectively. In addition, if specify as null or undefined, the existing expression and callback will all be removed. v 1.3.8 

Defaults to null.

Getter
function rowFilter(): Object|RowFilter
Setter
function setRowFilter(value: RowFilter)
Code -1
    // Display the top 10 rows only.
    grdMain.setRowFilter({
    	callback: null,
    	expression: "row < 10"
    });
    // or
    grdMain.setRowFilter(null);
    grdMain.setRowFilter("row < 10");
Code -2
    // Display the bottom 10 rows only.
    grdMain.setRowFilter({
    	callback: null,
    	expression: "row >= rowcount - 10"
    });
Code -3
    // Display the updated rows only.
    grdMain.setRowFilter({
        expression: "state == 'u'",
        callback: null
    });
See Also
RowFilter
Examples
Row Filtering