TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Andrew Fannin
NA
17
26.3k
CollectionViewSource cast as List
Jun 27 2011 2:14 PM
I am new to Silverlight programming and am currently working on a data driven web application using a WCF service. I have found a generic filter for filtering the datagrid which I really like. However, when I run my linq query to get the data from a table, I am putting it into a CollectionViewSource. For the filtering to work properly, I need to cast this as a list. Any ideas how this would be possible? Or is there a better way to consume the data than using a CollectionViewSource.
I am trying to return the query results into a List. However at runtime, I always get "null" for the list.
Here is my linq query and how I call the service.
public List<uvw_WXT520> GetWeather()
{
return (from t in DataContext.uvw_WXT520
orderby t.SampleDate_UTC descending
select t).Take(1000).ToList();
}
List<uvw_WXT520> list = (List<uvw_WXT520>)this.Resources["uvw_WXT520List"];
_Proxy.GetWeatherCompleted += (s, args) => list = args.Result;
_Proxy.GetWeatherAsync();
Reply
Answers (
0
)
opening links into a browser inside an app
How to get listview checkbox cheked items in windows mobile 5.0