How to filter data from observableCollection by a condition.


hi all,

i have observablecollection to  maintain records. need filter records per matching condition records, , records need push in observablecollection.

i have tried it, not working properly, not giving filtered records, giving records have main collection.

please me out.

 

 

hi,

well, example. assuming getrecords returns collection, , class in question called record , has datetime property called dateordered, following records ordered in last 5 days.

using system.linq;  ...  observablecollection<record> source = getrecords(); observablecollection<record> filtered = source.where(r = > r.dateordered > datetime.now.adddays(-5));

hope helps!

regards,
rob



Silverlight  >  Silverlight Controls and Silverlight Toolkit



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607