SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.toggleChecked method
Change Checked state of the rows specified by rows.
If have not specified rows, it will change the state of all rows. And, if specify rowEvents, onRowChecked event will be fired whenever an individual is changed. After changing the specified all rows, onCheckedChanged event will be fired.
function toggleChecked (rows: [GridRow|Integer], visibleOnly: Boolean, checkableOnly: Boolean, rowEvents: Boolean);
- Returns
- Void
- Parameters
- rows - [GridRow|Integer]. Defaults to null.
The array of Grid Row or Row number. If do not specify, it will be the entire rows.
- visibleOnly - Boolean. Defaults to false.
If it is true, it will only change expanded rows.
- checkableOnly - Boolean. Defaults to false.
If it is
true, it will only change
Checkable rows.
- rowEvents - Boolean. Defaults to false.
If specify as
true, whenever change the individual row,
onRowChecked event will be fired. (ver 1.3.4)
Code -1
// Change the Checked state of all rows.
$('#toggleCheck').click(function () {
grid.toggleChecked();
});
- See Also
- onCheckedChanged
- onRowChecked
- checkRows
- checkAll
- Examples
- Check Bar