RadDataServiceDataSource and Actions

3 posts, 0 answers
  1. Andrea
    Andrea avatar
    2 posts
    Member since:
    May 2011

    Posted 03 Oct 2013 Link to this post

    RadDataServiceDataSource does not support service operations that return an IQuerable<T> ?
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 04 Oct 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Andrea
    Andrea avatar
    2 posts
    Member since:
    May 2011

    Posted 04 Oct 2013 Link to this post

    Thank you :)
Back to Top