Deleting all rows in a table after editing the first row leaves behind an empty

Posted by: arun.sunny on 5 August 2021, 9:08 am EST

    • Post Options:
    • Link

    Posted 5 August 2021, 9:08 am EST - Updated 3 October 2022, 1:02 pm EST

    Hi team,

    I am seeing an issue when I try to delete all the rows from a table after editing first row and focus is in first row.

    All the rows are not deleted in this scenario.

    I can reproduce it in below link

    https://stackblitz.com/edit/angular-malzht?file=src%2Fapp%2Fapp.component.html

    Please see the gif image for reference

    Please let me know if you need any other information

    Thanks

    Arun Sunny

  • Posted 6 August 2021, 6:49 am EST

    Hi Arun,

    The issue here has occurred because when you were pressing the delete key the first row was still in the edit mode. To resolve the issue you need to first commit the edits before the delete operation, for that, you may add a keydown event listener to the FlexGrid and on delete keypress you can commit the edits using commitEdit method of collectionView before the delete operations can be done.

    You may refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-tp457c

    Regards,

    Ashwin

  • Posted 6 August 2021, 9:23 am EST

    Hi Ashwin,

    commitEdit() method seems to have solved the issue.

    Thanks for your support

    Regards,

    Arun Sunny

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels