Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / IGX-GRID – How to reset cell selection / row selection

IGX-GRID – How to reset cell selection / row selection

New Discussion
DUFEIL Philippe
DUFEIL Philippe asked on Feb 10, 2022 11:31 AM

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

Sign In to post a reply

Replies

  • 0
    Riva Ivanova
    Riva Ivanova answered on Feb 8, 2022 3:58 PM

    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

    • 0
      DUFEIL Philippe
      DUFEIL Philippe answered on Feb 10, 2022 11:16 AM

      Hello Riva,
      Thank you for your quick reply. It works perfectly.

      Best regards,

      Philippe DUFEIL

      • 0
        Riva Ivanova
        Riva Ivanova answered on Feb 10, 2022 11:31 AM

        Hello Philippe,

        I am glad that you find my suggestion helpful.

        Thank you for using Infragistics components.

        Regards,
        Riva Ivanova
        Entry Level Software Developer

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
DUFEIL Philippe
Favorites
0
Replies
3
Created On
Feb 10, 2022
Last Post
4 years ago

Suggested Discussions

Created by

Created on

Feb 10, 2022 11:31 AM

Last activity on

Feb 12, 2026 4:12 PM