Hi Team
I am using infragistics 2013.1 version grid and i am trying use rowselector feature and i am trying to select some rows and checked the checkbox from backend based on some data can you help me how we can do that.
i am giving you my sample code which i am trying to do but its not working
$("#prodByMeaInfra").on("iggriddatarendered", function (event, args) { $scope.$apply(function () { args.owner.element[0].rows[0].cells[0].innerHTML = "<span class=\"ui-state-default ui-corner-all ui-igcheckbox-normal\" name=\"hchk\" data-role=\"checkbox\" data-chk=\"on\"><span class=\"ui-icon ui-icon-check ui-igcheckbox-normal-on\"></span></span>"; }); });
or is there any way to keep the checked box state in same state at the time of using filter or sorting.
Please help me on this on urgent basis
Thanks
Vivek
Hi
Any help will be very helpful.
Hello Vivek,
RowSelectors checkboxes are checked when their row is selected. You can use Selection's API to select rows. Please refer to the Selection documentation for more information .
Preserving Selection through Filtering and Sorting will require some event handling. You'll need to bind to e.g. dataFiltering and dataFiltered events. In the dataFiltering event handler you'll need to get the currently selected rows and store their IDs (the solution will require that a primaryKey is set for the grid). In the dataFiltered event handler you'll reapply the stored selection state with the Selection API.
I am attaching a sample demonstrating this approach. It only has Filtering enabled but preserving the selected rows after sorting should be similar.
I hope this helps! Please, let me know if you have any additional questions or if you need help implementing the solution with Sorting enabled.
Best regards,
Stamen Stoychev