Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
IGX-GRID - How to reset cell selection / row selection
posted

Hello,
I use 2 grids one on the other separated by a splitter. When I select a cell in the top grid and I select a cell in the bottom grid, I would like to trigger the deselection on the top grid and vice versa. Is it possible and if so how to proceed ?
On the other hand, what is the best practice to return to a "no selection" mode on the whole grid after a selection of a row or a cell?

Best regards,

Philippe DUFEIL

Parents
No Data
Reply
  • 740
    Verified Answer
    Offline posted

    Hello Philippe,

    Thank you for posting to Infragistics Community!

    I have been looking at your question and I have prepared a small sample trying to reproduce the described behavior. I am using two IgxGrids and when performing either a cell selection or row selection operation, I am passing a reference of the respective grid to the corresponding event which is emitted upon selection (i.e., selected or rowSelectionChanging).

    Afterwards, I am keeping that reference in a variable, and on every selection operation by using the custom method clearSelection I am checking if the current selection is being performed in the same grid or the other one. If the selection is done in the opposite one, I am using IgxGrid’s clearCellSelection and deselectAllRows methods to clear it.

    Furthermore, after reviewing your question regarding returning to a “no selection” mode of the grid, what I could say is that if you are referring to removing all selections in the grid, then the above approach would be quite helpful for achieving your requirement.

    Here could be found my sample for your reference, where I am using the above approach, and when selecting a cell or row from one of the grids, the selection in the opposite one is being cleared successfully.

    Please test it on your side and let me know if you need any further assistance.

    Sincerely,
    Riva Ivanova
    Entry Level Software Developer

Children