In some cases I’ve been using a DataTable, filtering it witha DataView and displaying the DataView in a DataGrid. I’ve recently started switching to using my own classes. For example:
[Serializable] [System.Xml.Serialization.XmlRoot('Items', Namespace = 'http://mycomp.com/test')] public class Items: List<Item> { } [Serializable] [System.Xml.Serialization.XmlRoot('Item', Namespace = 'http://mycomp.com/test')] public class Item { //public properties here }
I then take my Items class and display it in a DataGrid which has worked really well. Is there some way I can apply a filter to my list though? DataView only works on datatables.
You can use FindAll() method: