The screenshot below is of a sample WPF application that deals with editing a collection of items:
A few features:
- You can make a batch of changes to the screen and hit "Save".
- If you deleted items, you can click "Show deleted items" to make them visible again, then click Undo to rollback the deletion
- The list on the left is bound to the same collection as the list on the right - the changes aren't written to the source until you click Save
- If you change an item, it highlights in bold
- If you change an item, you can undo the changes via the Undo button
- If you add items to the original collection, they will appear on screen (the Remote Update button)
The object representing an individual row is just a simple POCO object with
INotifyPropertyChanged support - it has no
HasChanges property or similar. Likewise, the collection is just an
Note: This sample uses the Xceed WPF DataGrid control. If you have a license, you can use your license key when running the sample (just set it in App.xaml.cs). Alternatively, you can download a 45 day trial from the Xceed website.
Hello, I'm Paul Stovell
I'm a Brisbane-based software developer, and founder of Octopus Deploy, a DevOps automation software company. This is my personal blog where I write about my journey with Octopus and software development.
I write new blog posts about once a month. Subscribe and I'll send you an email when I publish something new.Subscribe