views:

81

answers:

1

I've started hacking together a little application for managing a list of addresses and contacts. I fancied going the way of using XmlSerialization on custom objects, but have come up against a first hurdle in that I can't sort a DataGridView on a custom object collection without implementing BindingList.

Which has got me wondering whether custom objects is the way to go or not.

Question: Given that I'd like to have the data in one xml file, and that I'd like to display in a DataGridView, which is the best route to go - DataSet, custom objects, or are there others I'm not aware of? And if that's not enough constraints, what might be other deciding factors?

(If there is a good reason for going WPF, please let me know)

+1  A: 

Well here's what I ended up doing:

Custom classes for addressbook, contacts, people - using XmlSerialization attributes for saving/loading from xml.

Inherit from ObservableCollection to create SortableObservableCollection (pinched from here)

Bind the Address book contacts directly to a ListView in WPF - the main reason why is that in WPF filtering is almost free, and binding is so much simpler (two way binding for edition as well).

Benjol