Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

CRUD operations in a wpf datagrid C# MVP pattern

$
0
0

Hello everyone. Recently I found that everything I have done is wrong relating to CRUD operations in my datagrid and I need to do it all over again. The issue I have is that right now I go through all the values in the observable collection using a for each loop and then update or create every row. This obviously works and with my sample data it works quite quickly but will not work when there is a lot more data (it will but it will be slow).

So I am looking for some guidance on how best to do this. Maybe some way to make rows edited and added in the datagrid "dirty" so I could have an if statement that says only those rows should go through the update create process, or I also found a tutorial that works with mvvm so I didn't get completely that uses the Ieditable interface and the Begin Edit Cancel Edit methods but I am not sure how that works as there is no wpf code just c#.

Any and all help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>