Binding RadGridView to WCF service while allowing for paging

6 posts, 0 answers
  1. Paul Wendt
    Paul Wendt avatar
    3 posts
    Member since:
    Sep 2009

    Posted 08 Sep 2009 Link to this post


    We have a WCF service which will house all of our application's data access.  Our problem is that we want to be able to show all records [numbering thousands, sometimes hundreds of thousands] in a RadGridView, but we want to have one large list, as opposed to splitting up the data set in pages as far as the UI is concerned.  Basically, we'd want one large list and we'd get the "visible" records for each "current view".  We don't want the user to have to know about and/or keep track of the individual pages in the UI, however.

    We can manually fetch "pages" of data so when the user browses to record #50 and the gridview shows 100 records that are visible, we can query the WCF service for records 50-149.  In order to do this, we'd virtually load # records where # is the total count of record in the table and then just get the data for the currently-viewed page.

    We can figure out how to get that done, but we are wondering if there is a way we can use data binding to achieve this.  It would be preferrable to have a behind-the-scenes method that'd allow for paging on this level without complicating the UI [as much as possible, anyway].  

    Is a strategy that I've outlined possible?  If so, it would be very useful to get some sample code that makes use of this strategy.

    Sorry for the length of the message, but what we're asking for is pretty specific.

    Thank you very much for any assistance
  2. Vlad
    Vlad avatar
    11100 posts

    Posted 09 Sep 2009 Link to this post

    Hello Paul,

    You can try something similar to this blog post:

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Paul Wendt
    Paul Wendt avatar
    3 posts
    Member since:
    Sep 2009

    Posted 09 Sep 2009 Link to this post

    Thank you very much; this is what I was looking for.

    I apologize for not having found it through my own searching.  I did try to search both via google and via your own site's search engine, but I obviously used inadequate terms.

    Thanks again.
  4. Paul Wendt
    Paul Wendt avatar
    3 posts
    Member since:
    Sep 2009

    Posted 09 Sep 2009 Link to this post

    Upon further examination, this doesn't address our needs 100%.  I apologize for the long-winded explanation of what we are looking for.

    Where our needs differ from the sample:
    1) I would like to bind to a WCF service, not to a returned IQueryable from LINQ data context.
    2) I would like to have one continuous list of documents loaded into the scroll bar [to give an idea for how many documents are there], but the data would only be fetched when the user calls for it.  

    It seems like we'd be combining virtualization, binding, and WCF service access and I'm trying to wrap my head around doing all three with the Telerik toolkit.

    The "best" thing I can think of is a call to the service for the # of documents and then another call to get X documents, starting at position Y, [with the potential to specify a sort order instead of picking one for the caller].  This approach is exemplified here:

    An example of binding to WCF with Telerik can be found here:

    I guess I was looking for some sample code that combined the approaches [or better yet, to see if there was a built-in Telerik class that handled this sort of thing].

    Thank you for your time.

  5. Lisitsa
    Lisitsa avatar
    16 posts
    Member since:
    Apr 2014

    Posted 08 Jul 2015 in reply to Vlad Link to this post

    Link is not working :(

  6. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 09 Jul 2015 Link to this post


    As to the broken link to the blog post, you can find the correct one bellow: 
    WPF How To: Endless scrolling of 2mil. records using BackgroundWorker and LINQ to SQL

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top