I would like to send from the server what checkboxes should appear checked when initializing the grid?
I've seen the there are Selection methods to set the selected rows, but I've not found any method for the RowSelector checkboxes.
How can I do it?
Thanks
Any answer on this? Is it possible to set the checked boxes in the RowSelector from the javascript code?
I really need to know this so that we can decide if igGrid is the right component for our web project.
Hello Idwedari,
You are correct, there is no public API for achieving this. There are a few ways to simulate checking the checkboxes on the client which you can use as a workaround:
Selecting the specific checkbox and triggering a click event on it using jQuery. For example:
$("#grid1 span.ui-igcheckbox-normal:eq(" + checkboxIndex + ")>span").trigger("click");
The other way is to use a private function that requires the checkbox object itself.
var checkbox = $("#grid1 span.ui-igcheckbox-normal:eq(" + checkboxIndex + ")");
$("#grid1").data("igGridRowSelectors")._handleCheck(checkbox);
With the 2012 Volume 1 release which is coming soon, you will no longer need this additional code because the RowSelectors checkboxes will get checked by simply calling the selectRow method from the Selection feature. This change in the behavior was implemented mainly due to use cases similar to yours.
Thank you for using the Infragistics forums and hope this will help you resolve your issue!
Best regards,
Stamen Stoychev