Delete selected rows programatically

Hello,

I have an SfDataGrid control.

I would like delete the selected rows with custom button (remove from grid). 

I try with 

PrimaryGrid.DeleteSelectedRecords();

but nothing happen.

The grid DataSource is an ObservableCollection<MyModel>.

I have some other question related to delete process: how can I delete the row by MyModel.Id field?

How can I delete the selected rows by Delete key after popup a confirmation dialog?

Thank you very much for help!

BR, László



2 Replies

SZ SZL July 26, 2022 07:05 AM UTC

Hello,

My question is not relevant anymore, I succeed to delete rows by deleting the item from the original collection.

So modify row or delete row also working well.


Thank you!


BR, SZL




DM Dhanasekar Mohanraj Syncfusion Team July 26, 2022 03:51 PM UTC

Hi SZL,


Thanks for the update.


We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you.


Regards,

Dhanasekar M.


Loader.
Up arrow icon