Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Delete button of the previous row get selected after deletion of a row.

Delete button of the previous row get selected after deletion of a row.

New Discussion
Minakshi Mitra Kundu
Minakshi Mitra Kundu asked on Apr 12, 2021 2:37 PM
I am using IgxGrid. Deleting a row in the grid using the row delete button. The row which is deleted, the delete button of the row just before that deleted row get selected. I have used clearCellSelection() to deselect the the cells but still the button remains selected.
Please help me out.
Sign In to post a reply

Replies

  • 0
    Tihomir Tonev
    Tihomir Tonev answered on Dec 11, 2020 12:44 PM

    Hello Kundu,

    Thank you for reaching out.

    I have tested deletingRow function of igx-grid, but I was unable to reproduce the described behavior.

    I have created the following sample deleting selected rows with a button. Please have a look at it, and in case the problem persist, please modify it so I can investigate what might be wrong.

    https://stackblitz.com/edit/delete-row-igxgrid?file=src/app/app.component.ts

    Sincerely,
    Tihomir Tonev
    Associate Software Developer
    Infragistics

    • 0
      Minakshi Mitra Kundu
      Minakshi Mitra Kundu answered on Dec 11, 2020 7:03 PM

      I am explaining the issue by sending the screenshots of the scenarios.

      These are the rows before deleting a row.

      After deleting the 2nd row, the delete button gets selected in the current second row.

      I want this button to not get selected.

      I will look into the code you have provided , if that solves my issue.

      • 0
        Tihomir Tonev
        Tihomir Tonev answered on Dec 14, 2020 1:33 PM

        Hello Minakshi,

        Thank you for the provided images.

        In case you have rowSelection enabled, having a button on a row will select the row with that index. When a row is removed, the grid will re-initialize to display the newly created data, and will re-emit events for selection as there was selected row before the deletion.

        In order to remove the selection, you will have to clear it manually. I have attached a sample where you can check which properties you will need to modify:

        sample

        Should you have any further questions, please let me know.

        Sincerely,
        Tihomir Tonev
        Associate Software Developer
        Infragistics

      • 0
        Minakshi Mitra Kundu
        Minakshi Mitra Kundu answered on Dec 14, 2020 3:16 PM

        Thank u so much. This code resolved my issue.

      • 0
        Minakshi Mitra Kundu
        Minakshi Mitra Kundu answered on Apr 9, 2021 8:41 AM

        Hi Tihomir,

        This issue was resolved but now re-occurring after upgrading Ignite UI for Angular to 10.1.0 version. The fix provided by you still exist in the my code but it seems not working now. Please can you look into it once again.

      • 0
        Martin Evtimov
        Martin Evtimov answered on Apr 12, 2021 2:37 PM

        Hello Minakshi,

        Thank you for getting back to us!

        I believe you will find the following sample I have prepared for you very helpful. As you can observe there isn’t a selected/activated cell after deleting a row. The approach I’m using is very similar to the one provided by Tihomir and as you can observe even using IgniteUI for Angular 10.1.0 it is still working. Having this in mind I suggest checking for any discrepancy between the code within the provided sample and your project.

        If this sample is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me for further investigation.

        Looking forward to hearing from you.

        Best Regards,
        Martin Evtimov
        Associate Software Developer
        Infragistics, Inc.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Minakshi Mitra Kundu
Favorites
0
Replies
6
Created On
Apr 12, 2021
Last Post
4 years, 10 months ago

Suggested Discussions

Created on

Apr 12, 2021 2:37 PM

Last activity on

Feb 19, 2026 3:18 PM