Is there a way to set all check boxes (in a specific column) to true or false?
I am displaying data with two check box values, each in there own column. I want to have a "Select All" button on my form, which would tick every check box in one of the columns.
Then of course I would like to be able to get these changes from the transactions log.
Is this possible? Thanks.
Hello Shaun,
Yes, it's possible.
You should have Updating feature enabled. The igGridUpdating.setCellValue is the right API.
Here is an example which updates only the visible records in the grid:
function checkAll(check) { var updating = $("#grid1").data("igGridUpdating"), grid = $("#grid1").data("igGrid"), ds = grid.dataSource, i, record; for (i = 0; i < ds.dataView().length; i++) { record = ds.dataView()[i]; updating.setCellValue(record[grid.options.primaryKey], "MakeFlag", check); }}
If you want to update all the records in the data source you should use the $("#grid1").data("igGrid").dataSource.data() API.
Hope this helps,Martin PavlovInfragistics, Inc.