Aug 31, 2010, 11:59 AM
Checkbox selection model + getRowsValues
Hi,
I've a gridpanel with a checkboxselectionmodel. I load and sort my gridpanel store in code-behind and i only load the records that need to be displayed on the current page. For example if i have 90 records and i display 20 records per page and the current page is page 1, then i only get the first 20 records of the database.
Now when i select multiple records over multiple pages, for example i select 5 rows on the first page and 3 rows on the second page and use the following code to get the values of the selected rows:
<ext:Parameter Name="GridValues" Value="Ext.encode(#{GridPanelUnit}.getRowsValues({ selectedOnly:true, visibleOnly:true, dirtyOnly:false, currentPageOnly:false}))" Mode="Raw" />
then i only get the rowvalues of the selected records on the last page selected. so if my last page selected is page 2, then i get only the values of the 3 rows selected and not of the 8 selected records in total. This is actually normal, because i don't load the first page anymore.
But is it possible that the checkboxselectionmodel can remind the rowsvalues of the selected records?
Because if i do a count of the selected rows, then i get 8 records and i can also get the ID's of all the 8 records, but only the values of the 3 rows.
I've a gridpanel with a checkboxselectionmodel. I load and sort my gridpanel store in code-behind and i only load the records that need to be displayed on the current page. For example if i have 90 records and i display 20 records per page and the current page is page 1, then i only get the first 20 records of the database.
Now when i select multiple records over multiple pages, for example i select 5 rows on the first page and 3 rows on the second page and use the following code to get the values of the selected rows:
<ext:Parameter Name="GridValues" Value="Ext.encode(#{GridPanelUnit}.getRowsValues({ selectedOnly:true, visibleOnly:true, dirtyOnly:false, currentPageOnly:false}))" Mode="Raw" />
then i only get the rowvalues of the selected records on the last page selected. so if my last page selected is page 2, then i get only the values of the 3 rows selected and not of the 8 selected records in total. This is actually normal, because i don't load the first page anymore.
But is it possible that the checkboxselectionmodel can remind the rowsvalues of the selected records?
Because if i do a count of the selected rows, then i get 8 records and i can also get the ID's of all the 8 records, but only the values of the 3 rows.