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

Web Service Grid Combo Learning Stump

2 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 26 Dec 2011, 03:00 AM
Hi everyone. I want to use a Telerik grid to display the results of a SQL View. I was hoping I could find some code that I could read, get the jist of what it was doing, modify it and get going but I can't find anything. At this linkhttp://demos.telerik.com/aspnet-ajax/grid/examples/clientbinding/defaultcs.aspx the grid control is the one I want to use (3.5 and supports the sort) and it does have sample code but of the three examples it's all a lot of new programming style for me. The example that uses WCF looks promising. With the WCF route can I use a MSSQL View or use the statements of the View in a web service? I have over 600 Views to do so I don't want to do much work in getting a View ready. I want to be able to use the View by name or copy an paste its definition. With that being said can someone help me use my existing Views code to get the data displayed in a Telerik Grid with or without the examples from the provided link? Super please.

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 28 Dec 2011, 01:29 PM
Hello Juan,

Thank you for contacting us.

As you want to use client binding with web service, the web service will take data from the server and transfer it to the client. So your dataviews will be stored on the server. In such case you need just to install the ADO.NET providers or the Entity framework providers for MySQL and this will ensure access from .NET means to MySQL.

Then the easiest way get all the views with less code is to write a web method in this service which will return the data from the view by a specified name of the view as a parameter of this method. Thus the only thing you will need to do when you want to show a different view is to change the parameter of the web method. You could check this MSDN help thread for a getting started information on WCF services.

When all this is done you could use the approaches from this demo to bind the grid on the client.

Kind regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Juan
Top achievements
Rank 1
answered on 29 Dec 2011, 03:20 PM
Thanks Andrey.  Good info.
Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Juan
Top achievements
Rank 1
Share this question
or