Answer the question
In order to leave comments, you need to log in
Binding GridView WPF to Entity Framework. How to update the GridView when a row changes, which should no longer be in the selection?
There is a RadGridView from Telerik. There is a table in the database with the id_status field. Uses Entity Framework 6.0 for binding.
ordersDb.Orders.Where(t => t.id_status!= 4 && t.id_status != 6).Load();
gridOrders.ItemsSource = ordersDb.Orders.Local.ToBindingList();
Order ord = ordersDb.Orders.Find((gridOrders.SelectedItem as Order).Id);
ordersDb.Orders.Remove(ord);
ordersDb.SaveChanges();
ordersDb.Orders.Find((gridOrders.SelectedItem as Order).Id).id_status = 6;
ordersDb.SaveChanges();
ordersDb.Tickets.Where(t => t.id_status != 4 && t.id_status != 6).Load();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question