Skip to main content
Home Forums General Silverlight Getting Started LinQ on Datagrid?
2 replies. Latest Post by rasmasyean on June 28, 2009.
(0)
rasmasyean
Member
82 points
165 Posts
06-25-2009 10:17 PM |
Can you run a query against a DataGrid (or a Collection)?
TomBeeby
Participant
1151 points
188 Posts
06-26-2009 12:43 AM |
Well...
A datagrid has a property called ItemsSource which is an IEnumerable collection. Can you run Linq against an IEnumerable? Of course!
eg:
List<Person> myList = getValues();var result = myList.Where(i => i.Code > 0).FirstOrDefault();
06-28-2009 4:50 AM |
Thanks. Is there also a way to use a "query statement", instead of those methods?