You are removing an item from the database, but not from the collection binded to your
DataGrid
(
_loadDataBinding
). You can do this in your
delete
method:
private void delete(object obj)
{
using (Test1Entities context = new Test1Entities())
{
Custmor cus = context.Custmor.Find(currentCustomer.ID);
context.Custmor.Remove(cus );
context.SaveChanges();
}
_loadDataBinding.Remove(CurrentCustomer);
}