With virtualization enabled and a user checking the checkbox to "select all", only a handful of records gets reported as selected when requesting the selected rows from the grid.
How do I retrieve all the selected rows, regardless of whether virtualizatoin is enabled or not? Basically i need a code way to get all the rows selected, regardless of whether the user scrolled down 10,000 rows and selected one there after selecting the first row in the list.
Am I missing something obvious?
Hello,
Is this issue resolved in version 15.2?
Thank you,
Dare O
Hello Sean,
There is a Known Issue which states: "igGridSelection works only with visible rows when virtualization is enabled". Because selectedRows API is using the Selection, this means that the API will report only the currently available selected TR DOM elements.
When Virtualization is enabled you cannot get all the selected rows as DOM elements.
If you want to get all the selected rows as objects then you can check the state of the "select all" checkbox and get the records directly from the grid data source.To check the state of the "select all" checkbox use the following code:var checked = $("#grid1").data("igGrid").headersTable().find("span[name='hchk']").attr("data-chk") === "on";
where "grid1" is the id of the grid.
To get the records from the data source use the following code:$("#grid1").data("igGrid").dataSource.data();P.S.: There is also and issue that when the user checks the "select all" checkbox and scrolls the virtual grid the new rows will not be checked/selected. The issue is with internal development id 138870 and will be resolved in one of our future service releases.
Best regards,Martin PavlovInfragistics, Inc.
I should mention this is using 2012.2