RadDataServiceDataSource does not support service operations that return an IQuerable<T> ?
3 Answers, 1 is accepted
0
Rossen Hristov
Telerik team
answered on 04 Oct 2013, 06:38 AM
Hi,
RadDataServiceDataSource supports DataServiceQuery<T> only since its only purpose is to do the CRUD part apart from showing the data.
Service operations do not have a CRUD part, so you don't really need RadDataServiceDataSource for that -- simply bind RadGridView.ItemsSource to your IQueryable<T> and RadGridView will start doing its filtering (Where), sorting(OrderBy) and grouping(GroupBy) directly on it. Since our data engine uses LINQ, providing an IQueryable as the ItemsSource of RadGridView is the best thing that can ever happen.
In case you need paging, wrap your IQueryable<T> into a Telerik.Windows.Data.QueryableCollectionView class and then bind both RadGridView and RadDataPager (Skip and Take) to this QueryableCollectionView. All your operations will happen on the server.
I hope this helps.
Regards,
Rossen Hristov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>