Server-side paging, sorting and filtering for your Silverlight DataGrid

Wednesday, January 21, 2009 by Vladimir Enchev | Comments 13

I’ve made small demo how to perform server paging, sorting and filtering with RadGridView for Silverlight using ADO.NET DataServices and dynamic LINQ:

Untitled

All operations are applied directly to the data-base server:

Untitled1

And you have minimal traffic between server and client:

Untitled2

With this approach you can handle millions of records!

Enjoy!

[Download]

13 Comments

  • Ben Hayat 21 Jan 2009
    Vlad, great job!
    I think you should send the link to Pablo or Mike for them to put it in their blog as well. I'm sure many Astoria developers would love to see your server side sample!

    Great Job!
    ..Ben
  • Ben Hayat 21 Jan 2009
    Vlad, I haven't looked at the code yet, but are "you" converting your LINQ to URI commands on the client side or are you leveraging on Astoria's client side to convert it for you?
    ..Ben
  • Vlad 21 Jan 2009
    Thanks Ben!
    Generally when you use extension methods (like Skip(), Take(), OrderBy(), etc.) for DataServiceQuery all these will be translated automatically to URI commands like $skip, $top, $orderby, etc.
    Vlad
  • Fallon Massey 23 Jan 2009
    Interesting stuff.

    I haven't had a chance to look at everything, but I did see the file Dynamic.cs.

    Is there a further explaination of the classes in this file somewhere, since the article sort of skips over the implementation.

    Thank You.
  • Vlad 26 Jan 2009
  • Jeff Herington 08 Feb 2009
    I would very much like to try this code but it continues to fail at 

    private

     

    void EndExecute(IAsyncResult asyncResult)

     

    RadGridView1.ItemsSource = query.EndExecute(asyncResult).ToList();

    DataServiceQueryException was unhandled by user code. Any help on this would be appreciated.

    Thanks!

  • Mike Naylor 19 Feb 2009
    I also get a DataServiceQueryException ... same as Jeff.
  • ViolentKun 10 Mar 2009
    Cool feature. Thanks for the demo. Is DataService Binding available for ASP.NET AJAX Q1 2009 ? A Radgrid with Server-Side Paging was my christmas wish.
  • Jamal Simpson 23 Mar 2009
    May probably be a good idea to encode the request.  You wouldn't want someone going to

    WebDataService1.svc/Delete?where='id%20>%201'
  • rlaci 19 Mar 2012
    Very nice solution.
    The only disadvantage is that it can't handle Paging easily:- you can't use a 
    - you can't use a PagedCollectionView and a Pager control
    - if you want to implement your own pager, somehow you have to query the number of rows without filters
  • rlaci 19 Mar 2012
    Very nice solution.
    The only disadvantage is that it can't handle Paging easily:
    - you can't use a PagedCollectionView and a Pager control
    - if you want to implement your own pager, somehow you have to query the number of rows without filters
  • rlaci 19 Mar 2012
    Very nice solution.
    The only disadvantage is that it can't handle Paging easily:
    - you can't use a PagedCollectionView and a Pager control
    - if you want to implement your own pager, somehow you have to query the number of rows without filters
  • rlaci 19 Mar 2012
    Very nice solution.
    The only disadvantage is that it can't handle Paging easily:
    - you can't use a PagedCollectionView and a Pager control
    - if you want to implement your own pager, somehow you have to query the number of rows without filters

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)