Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Shift + Click to Select Multiple Rows in Tree Grid

Shift + Click to Select Multiple Rows in Tree Grid

New Discussion
Manikanta Vundavalli
Manikanta Vundavalli asked on Mar 21, 2022 8:15 AM

Hi,

I have a scenario where the user should be able to multi select rows with Shift+Click besides Ctrl+click in Tree Grid. Is this possible?

Thanks,

Manikanta Vundavalli

Sign In to post a reply

Replies

  • 0
    Riva Ivanova
    Riva Ivanova answered on Mar 18, 2022 7:07 PM

    Hello Manikanta, 

    Thank you for posting in our community!

    This is an initial update to let you know that I am currently in the process of creating a sample for you, illustrating how such behavior could be achieved. I will keep you posted on my progress.

    Sincerely,
    Riva Ivanova
    Entry Level Software Developer

  • 0
    Riva Ivanova
    Riva Ivanova answered on Mar 21, 2022 8:15 AM

    Hello Manikanta,

    Thank you for your patience while I was looking into this matter for you.

    I have been looking into your question and what I could say is that the combination of pressing the shift key and mouse click initially provides multirow selection as it selects the first clicked row and then when selecting another row, it selects all in that range and can be performed simultaneously with the ctrl + mouse click combination.

    However, regarding your requirement, at this point, we do not provide changing the row selection with shift key behavior out of the box. Having this in mind, an approach I could suggest is using a HostListener for a keydown event and check whether the pressed key is either Shift or Control and afterwards use the IgxTreeGrid’s selected and rowSelectionChanging events in order to apply custom logic for selecting multiple rows both through shift key + mouse click and ctrl key + mouse click events.

    Additionally, in order to demonstrate my suggestion, I have prepared a small sample trying to reproduce the described behavior. On my side, everything works as expected and I am able to perform multi row selection both with the combination of shift key + mouse click and ctrl key + mouse click. Furthermore, to ensure that the marked rows are indeed the ones being selected and saved in the IgxTreeGrid’s selectedRows property, I am using a button (i.e., “SHOW SELECTED”) and when clicking it, I can see in the console all selected rows.

    Here could be found my sample for your reference. Please test it on your side and let me know if you need any further assistance.

    If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce it.

    Looking forward to hearing from you.

    Sincerely,
    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
Manikanta Vundavalli
Favorites
0
Replies
2
Created On
Mar 21, 2022
Last Post
4 years ago

Suggested Discussions

Created on

Mar 21, 2022 8:15 AM

Last activity on

Feb 11, 2026 3:11 PM