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

SQL Server database to kendo Data Source

11 Answers 2092 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pradeep
Top achievements
Rank 1
Pradeep asked on 25 Jan 2012, 05:52 PM

I will make my query really simple,

I have a database in my local sqlServer

I need to bind a table to Kendo Data Source using sql connection

Is there any way to achive this ?

please post a sample application in asp.net.

11 Answers, 1 is accepted

Sort by
0
Bobby Pack
Top achievements
Rank 1
answered on 26 Jan 2012, 03:55 AM
https://github.com/telerik/kendo-examples-asp-net
0
Pradeep
Top achievements
Rank 1
answered on 01 Feb 2012, 05:13 AM
Thanks Bobby Pack ,

I was able to create a grid and managed to show data in the grid.

But was not able to do create, update or delete.

Moreover when I give the model in schema data wont populate.

Please let me know where did it went wrong.

I am also attaching the files I have created
0
Bobby Pack
Top achievements
Rank 1
answered on 01 Feb 2012, 05:43 PM
I do not know, haven't made it that far yet.
0
Chris
Top achievements
Rank 1
answered on 01 Feb 2012, 09:21 PM
It would be nice if we could get some projects that are hooking up asp datasource controls to a kendo data source (or even just an example showing how to hook up kendo data source to a connection made via C# (for example, an SQL connection that is filling a data table) Is this a possibility?
0
Atanas Korchev
Telerik team
answered on 02 Feb 2012, 09:44 AM
Hello,

Kendo UI widgets cannot be bound to the SqlDataSource control. The latter supports only ASP.NET controls. 

You can check the following project that show Kendo UI grid CRUD configuration in ASP.NET:
https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-page-methods-crud
https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-wcf-crud
https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-web-service-crud


Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Chris
Top achievements
Rank 1
answered on 02 Feb 2012, 05:25 PM
Atanas, 

Thanks for your response, it lead me in the right direction. However, I am not sure how the WCF service was generated in the grid-wcf-crud example, I chose to use open access to generate my .svc and so my .cs files are quite different and it's difficult for me to figure out how to update the javascript to use my service since our generated service files are so much different (at least to an intermediately skilled developer such as myself). Is there any way someone could throw together the example but using open access to generate the service? It only took me a couple minutes to generate the service with open access so I wouldn't think it would take much time to get a project set up that way.


Thanks!
0
Atanas Korchev
Telerik team
answered on 06 Feb 2012, 03:34 PM
Hi, 

I just created a project which shows how to use an OpenAccess service with the Kendo Grid. There are a few modifications required in order to make things work:
  1. The service endpoint needs to be accessible via the browser (by default it is not). Check the web.config.
  2. The Create method should return an instance of the DTO and set its identity property (ProductID in this example). Check the CreateProduct method.
  3. The DtoKey property must map to the value of the key itself. The default Converter should be modified a bit.
Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Adam
Top achievements
Rank 1
answered on 27 Feb 2012, 05:14 PM
Is there anyway to create these services in Java rather then c#?
0
Roger
Top achievements
Rank 1
answered on 28 Feb 2012, 09:07 AM
Hi,
am trying to run the demo "grid-web-service-crud" and get an error that "Cannot serialize interface System.Collections.Generic.IEnumerable".


But have found the problem...am using SQL Server 2008 R2 instead of Express and it doesn't like User Instance in the connection string
0
Fedon
Top achievements
Rank 1
answered on 03 Aug 2012, 10:21 PM
Hello,
i am quite new to web development, so this may sound silly.
If you have a sql database and fetch the data with php, is it a bad practice to populate a javascript item with php<->js interaction, and pass this item as the data of DataSource?
0
Agostino
Top achievements
Rank 1
answered on 18 Aug 2012, 04:28 PM
In the links of this thread we can understand how to access a "Northwind" sample database whose file is included in the project.

Could you please make an example of the <connectionStrings> content in web.config, if I want to connect to a remote Sql server database? And how does the rest of the code change in this case?

Thanks a lot for any feedback.
Tags
Data Source
Asked by
Pradeep
Top achievements
Rank 1
Answers by
Bobby Pack
Top achievements
Rank 1
Pradeep
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Atanas Korchev
Telerik team
Adam
Top achievements
Rank 1
Roger
Top achievements
Rank 1
Fedon
Top achievements
Rank 1
Agostino
Top achievements
Rank 1
Share this question
or