Click here to Skip to main content
16,004,944 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
I have an ObservableCollection<Customers> class with some number of records (for ex., Customers table from Northwind Database using LINQ to SQL classes). I have created ICollectionView using this class.
Now I want to filter the columns (for ex., in database table remove the columns like Name, Phone if exist) from this View. And I'll assign this view into datagrid control.
How to remove such columns in CollectionView? Thanks in advance...
Posted
Updated 10-Feb-10 4:47am
v3

1 solution

Using LINQ you can sort your class objects using:
C#
var sortedObjects =
from a in collection01
orderby a.Property
select a;



Commonly covered on MSDN[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900