Is there a way to select the rows in the grid and have those selected rows remain selected until one is selected a second time?
currently, if i select a bunch of rows at one time, and then simply click any single row, all previously selected rows are automatically unselected.
thanks,
wvusaf
Hello wvusaf,
Thank you for posting in our forums!
Multiple rows can be selected/deselected individually by holding CTRL when clicking on the row.
If you wish to handle this manually, and if you can use cell selection mode instead of row mode, the behavior you are describing sounds like how the multipleCellSelectOnClick feature works. Please not that this option only works in cell selection mode.
Otherwise, you may be able to achieve your desired functionality by handling the rowSelectionChanging event and using the selectRow and deselectRow methods.
If you need any further assistance with this, please let me know and I will be glad to help.
The way the grid works, it doesn't matter if i have it set to Row or Cell selection. every time a row is selected by clicking in any cell, the whole row is selected and highlighted. i have RowSelectors on with checkboxes enabled and the the checkboxes are also selected when a new row is clicked on.
the problem is that when any rows are selected and highlighted, selecting any other single row will unselect all previously selected and highlighted rows. i jsut want the row to be selected when i click on the checkbox, and i want the checkbox to remain checked until i uncheck it. but this behavior doesn't seem possible.
is there something i can do to achieve the behavior i need?
Hi wvusaf,
Thanks for getting back to me.
If you only want the state of any selected rows to change when the RowSelector's checkbox is changed, I found this forum thread which discusses using some of the igGrid's events to allow this.
I have also put together a quick jsFiddle to demonstrate this. In the fiddle, only clicking on RowSelector checkboxes will select/deselect the row.
If you need any further assistance with this, please let me know.
thanks, Michael. That will work fine.
note, however that i did need to handle a couple more events in order to accomplish my full requirement.
i needed to handle the iggridselectionrowselectionchanged and iggridrowselectorscheckboxstatechanged events to detect when all rows are either selected or unselected at once using the header checkbox.