This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 3 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Grid › grid bug (select all on filtered grid)
Tagged: #jqwidgets-grid, bug, check all, filter, grid, javascript grid, jquery grid
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 3 months ago.
Hi,
I think I find a bug.
The bug:
When you have a grid with 10 items and you will check 1 wor(checkboxselection)
then apply filter on the same grid. This grid will return for example 2 rows that are not selected still OK.
Then you will click on check all.
You are assuming that this grid has 3 items selected in total. In reality only 2 items are selected.
try it here for example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/checkboxselection.htm?arctic.
steps to reproduce on above link:
1: select first item in grid
2: apply filter where any random 2 rows are filtered
3: click check all
4: clear filter
5: COUNT IF YOU HAVE 3 items selected in grid. => You will get only 2 rows selected(filtered rows) and 1st item is deselected
Question: Is there any way when check all option is selected on filtered grid it will also include the item(s) selected before the filter has been applied?
Select
Hello antrax13,
I tested our example and it seems to work fine.
In the moment when you try to select all rows (when using selectionmode: ‘checkbox’) from ‘indeterminate’ to ‘select all’ (true) this will first deselect all and after that will select all items. This is the reason to miss some checked rows after filtering.
I would like to suggest you try to bind to filter
set a flag (isFiltered) with that will recognize when the data is filtered. After that get all checked rows in that moment with getselectedrowindexes
method of the Grid (arrayOfFirstCheckedItems). Next step is to recognize when all rows are deselected, you could use rowselect
event and check also the flag for the state of the Grid. If all rows are deselected and it still has filter value (isFiltered: true) and the rows are selected you could add the first array of items (arrayOfFirstCheckedItems).
Best Regards,
Hristo Hristov
jQWidgets team
http://www.jqwidgets.com
You must be logged in to reply to this topic.