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

Bind to WebService

5 Answers 124 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kennet
Top achievements
Rank 2
Kennet asked on 12 Sep 2009, 11:29 AM
I want to bind/connect my WPF dataGrid to my webservice. Well that is simple, but I have 100000 rows or so in the DB. How can I do "lazy loading" or 

Asynchronous fast loading, somthing like the "Client binding 1 millinon..." example.

I also need sorting, only read, no update or insert.

And example on this, preferly with webservice code C#.

Thanks!

5 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 16 Sep 2009, 03:21 PM
Hi Kennet,

You can reuse the idea from this blog post, which illustrate how to implement something similar in WPF. For bringing the data back to the client you can use .NET RIA Services.


Greetings,
Stefan Dobrev
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
Kennet
Top achievements
Rank 2
answered on 18 Sep 2009, 08:32 AM
Thanks Stefan,

Works good with Linq directly true my DB.  But How do I use the RIA for rund linq over a webservice?

Another thing, If scroll the grid with the mousewheel then the grid don't load in new rows at end.

And second, how can I get the slider to show all rows, meaning now I have to scroll to bottom before I know there is more rown. So scrolling to last row in a database with 100000 rows take a long time.

/Ken
0
Stefan Dobrev
Telerik team
answered on 23 Sep 2009, 08:43 AM
Hello Kennet,

Unfortunately RIA services did not provide native WPF support yet, so we cannot do client LINQ queries and execute them on the server.

You should handle the MouseWheel on your own and do the calculations in the event handler.

You should have a method that returns the count of all items. Using this number you can correctly set the required Slider's properties.

All the best,
Stefan Dobrev
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
Kennet
Top achievements
Rank 2
answered on 23 Sep 2009, 04:54 PM
Thanks Stefan,

Im confused, in your previous answer to you told me: "For bringing the data back to the client you can use .NET RIA Services.", and in this answer you say: "Unfortunately RIA services did not provide native WPF" ...

How shall I "talk" to my grid via a webservice then??

/Ken

0
Stefan Dobrev
Telerik team
answered on 28 Sep 2009, 08:49 AM
Hello Kennet,

You can create whatever service you want (ASMX, WCF, REST, etc.) and as soon as you have some data on the client you can bind the grid view. What you can do then is to attach to RadGridView's *ing events (like Sorting, Filtering, etc.), handle the user input for the current operation, call the service, fetch the new data and rebind the grid.

Regards,
Stefan Dobrev
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.
Tags
GridView
Asked by
Kennet
Top achievements
Rank 2
Answers by
Stefan Dobrev
Telerik team
Kennet
Top achievements
Rank 2
Share this question
or