SMART datagrid v.1 > Classes > RowFilter
Filter Expression which will select the rows to be displayed in grid when organizing grid rows from Data Set.
Only the rows which have returned true within expression will be organized as grid rows. In the table below, it has listed the variables which can be used in expression. If set callback, this property will be ignored.
Defaults to null.
Variable | Explanation |
---|---|
'row' | The index of data row. |
'state' | The state of data row. 'c': DataRowState.CREATED, 'u': UPDATED, 'd': DELETED, 'x': CREATE_AND_DELETED |
'tag' | The tag of data row. |
'rowcount' | The number of data row |
'childindex' | The child index of this grid row within group row. |
'childcount' | The number of child grid row in the case of group row. |
'siblingcount' | The number of child grid row of parent group row. |
'values' | Get the value by field name or field index of common fields. |
// Get and display only the top 10 rows.
grid.setRowFilter({
callback: null,
expression: "row < 10"
});