DataGrid and deleted entity

Jan 22, 2010 at 5: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?

Jan 22, 2010 at 12:58 PM

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).