SMART datagrid v.1 > Classes > CheckBar
When click CheckBar head cell, it will toggle Checked state of all rows, and if set this callback, this function will be called in each row to determine the checked state of rows only which have returned true.
First, checkableOnly should be false or Checkable of row should be true. If specify this callback function, checkAllExpression will be ignored.
Defaults to null.
grid.setOptions({
checkBar: {
// Only toggle even rows.
checkAllCallback: function (row) {
return row.index() % 2 == 0;
}
}
}
grid.setCheckBar({
// Only toggle the rows which 'Quantity' is greater than 40.
checkAllCallback: function (row) {
return row.getValue('Quantity') >= 40;
}
});