SMART datagrid v.1 > Classes > CheckBar
Callback function which determines Checkable state of Grid Rows.
The user can click the rows which return true from this callback with mouse to change checked state. CheckBar cells of which rows are not Checkable will be displayed in inactive state. If set this property, checkableExpression expression will be ignored.
Defaults to null.
// Can only check the rows of which salary is greater than 10000 dollars.
grid.checkBar().setCheckableCallback(function (grid, row) {
return row.getValue("salary") > 10000;
});
grid.setCheckBar({
'checkableExpression': function (grid, row) {
return row.getValue("salary") > 10000;
}
});
grid.setOptions({
checkBar: {
'checkableExpression': function (grid, row) {
return row.getValue("salary") > 10000;
}
}
});