DataGrid and deleted entity

Jan 22, 2010 at 4:16 AM

Your code works great. Thanks a lot.

I have a problem here. I have a child entity bound to an ASP.NET datagrid, I deleted some rows in the child entity, how can I hide the deleted rows in the datagrid, before the user click the Save button and submit the changes to the database?

Coordinator
Jan 22, 2010 at 11:58 AM

Hi there,

You will need to filter the record based on the LINQEntityState property being == deleted. Basically don't show the row for these records or filter them out when you set your data source (using LINQ to objects).

Cheers

Matt.