Delete Selected Row on click of delete button

Posted by: technical.store.technical on 3 June 2021, 7:27 am EST

    • Post Options:
    • Link

    Posted 3 June 2021, 7:27 am EST

    Hi,

    I’m trying to delete entire selected rows (which i’m getting from getSelectedRows() function and my row contains both readonly and editable items) on delete button click. But i’m unable to achieve this.

    I used [allowDelete] = “true” initially but it was deleting the selected row using “delete key” . I want to achieve the same functionality but using the delete button.

    I’ve created a snippet for the same.-

    https://stackblitz.com/edit/angular-ecgjl1?file=src/app/app.component.ts

  • Posted 4 June 2021, 2:53 am EST

    Hi,

    You can use the CollectionView instance of FlexGrid to delete the bound items of the selected rows.

    Please refer to the updated sample below:

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

    Regards,

    Ashwin

  • Posted 4 June 2021, 4:31 am EST

    Hi Ashwin,

    Thank you for the solution. It works.

    Regards

Need extra support?

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

Learn More

Forum Channels