This is a migrated thread and some comments may be shown as answers.

Binding RadGridView to WCF service while allowing for paging

5 Answers 140 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul Wendt
Top achievements
Rank 1
Paul Wendt asked on 08 Sep 2009, 08:20 PM
Hello,

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

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Sep 2009, 05:35 AM
Hello Paul,

You can try something similar to this blog post:
http://blogs.telerik.com/vladimirenchev/posts/09-02-02/wpf_how_to_endless_scrolling_of_2mil_records_using_backgroundworker_and_linq_to_sql.aspx

Best wishes,
Vlad
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.
0
Paul Wendt
Top achievements
Rank 1
answered on 09 Sep 2009, 02:42 PM
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.
0
Paul Wendt
Top achievements
Rank 1
answered on 09 Sep 2009, 03:07 PM
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.

0
Lisitsa
Top achievements
Rank 1
answered on 08 Jul 2015, 04:28 PM

Link is not working :(

0
Dimitrina
Telerik team
answered on 09 Jul 2015, 07:24 AM
Hello,

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

Regards,
Dimitrina
Telerik
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
Tags
GridView
Asked by
Paul Wendt
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Paul Wendt
Top achievements
Rank 1
Lisitsa
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or