4 Answers, 1 is accepted
0
Hello Vinay,
The JSON response should be in the formats shown below. Numeric keys are not allowed, because the field names used by the Grid DataSource object must be valid Javascript identifiers.
- simple JSON array
- response, where the data is in a nested field and the Grid dataSource schema must be configured:
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data
>> "In other words, how can I create a crudServiceBaseUrl?"
I don't understand this question, what do you mean by a "crudServiceBaseUrl"?
Regards,
Dimo
Telerik
The JSON response should be in the formats shown below. Numeric keys are not allowed, because the field names used by the Grid DataSource object must be valid Javascript identifiers.
- simple JSON array
[{
"ProductID"
: 1,
"ProductName"
:
"Chai"
,
"UnitPrice"
: 18,
"UnitsInStock"
: 39,
"Discontinued"
:
false
}, {
"ProductID"
: 2,
"ProductName"
:
"Chang"
,
"UnitPrice"
: 19,
"UnitsInStock"
: 17,
"Discontinued"
:
false
}, {
"ProductID"
: 3,
"ProductName"
:
"Aniseed Syrup"
,
"UnitPrice"
: 10,
"UnitsInStock"
: 13,
"Discontinued"
:
false
}]
- response, where the data is in a nested field and the Grid dataSource schema must be configured:
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data
{
"total"
: 3,
"foo"
:
"bar"
,
"data"
: [{
"ProductID"
: 1,
"ProductName"
:
"Chai"
,
"UnitPrice"
: 18,
"UnitsInStock"
: 39,
"Discontinued"
:
false
}, {
"ProductID"
: 2,
"ProductName"
:
"Chang"
,
"UnitPrice"
: 19,
"UnitsInStock"
: 17,
"Discontinued"
:
false
}, {
"ProductID"
: 3,
"ProductName"
:
"Aniseed Syrup"
,
"UnitPrice"
: 10,
"UnitsInStock"
: 13,
"Discontinued"
:
false
}]
}
>> "In other words, how can I create a crudServiceBaseUrl?"
I don't understand this question, what do you mean by a "crudServiceBaseUrl"?
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

vinay
Top achievements
Rank 1
answered on 11 Sep 2014, 01:32 PM
Hello Dimo,
Thank you for this wonderful reply. This really makes sense and sorry for the confusion in last question.
Actually, I am just a beginner in JSP and my dev could not identify this one thing explained below:
var crudServiceBaseUrl = "http://demos.telerik.com/kendo-ui/service", I am trying to replace this with my URL hosted on server, but getting confused a bit. Nevertheless, I am still learning. So let me take my ride, if you feel uncomfortable answering this silly question :P
I am going through all the articles so at some point, I should be able to interface all these pieces and get it working. (P.S If I had knew everything, I would have designed it myself ;))
Thank you for this wonderful reply. This really makes sense and sorry for the confusion in last question.
Actually, I am just a beginner in JSP and my dev could not identify this one thing explained below:
var crudServiceBaseUrl = "http://demos.telerik.com/kendo-ui/service", I am trying to replace this with my URL hosted on server, but getting confused a bit. Nevertheless, I am still learning. So let me take my ride, if you feel uncomfortable answering this silly question :P
I am going through all the articles so at some point, I should be able to interface all these pieces and get it working. (P.S If I had knew everything, I would have designed it myself ;))
0

vinay
Top achievements
Rank 1
answered on 11 Sep 2014, 01:37 PM
Also, A suggestion :)
Can there be a doc where we newbies can learn how to design server side scripting for Kendo UI or UI for JSP?
because, this is one hiccup that makes every newbie worried. I am a GUI designer and if I want to test my design, I have rely on my dev and seems like he is incompetent as well ;)
Regards
Vinay
Can there be a doc where we newbies can learn how to design server side scripting for Kendo UI or UI for JSP?
because, this is one hiccup that makes every newbie worried. I am a GUI designer and if I want to test my design, I have rely on my dev and seems like he is incompetent as well ;)
Regards
Vinay
0
Hello Vinay,
The "crudServiceBaseUrl" is simply a string variable that spares us the need to repeat the same URL at several places. In general, you need a server implementation, which is able to do the following:
+ receive and parse JSON input from the client (browser)
+ create and send JSON output to the client
Our documentation lacks instructions how to do this for two main reasons:
- the code is different for every server platform and there are multiple ways to implement the same thing
- developers should already possess the required skills to implement the JSON-related code, because this requires general knowledge, which is needed no matter whether Kendo UI will be used or not
What I recommend you to do is the following:
+ review closely our offline Kendo UI Java wrapper demos and check the code, which deals with sending and receiving JSON. Generally, each respectable server platform and language provides some ready-to-use tools or libraries for using JSON, so you don't need to write much code manually
+ check the HTTP data requests, which the browser makes in the browser's developer console. In this way you will see the exact format of the content, which is sent and received
Regards,
Dimo
Telerik
The "crudServiceBaseUrl" is simply a string variable that spares us the need to repeat the same URL at several places. In general, you need a server implementation, which is able to do the following:
+ receive and parse JSON input from the client (browser)
+ create and send JSON output to the client
Our documentation lacks instructions how to do this for two main reasons:
- the code is different for every server platform and there are multiple ways to implement the same thing
- developers should already possess the required skills to implement the JSON-related code, because this requires general knowledge, which is needed no matter whether Kendo UI will be used or not
What I recommend you to do is the following:
+ review closely our offline Kendo UI Java wrapper demos and check the code, which deals with sending and receiving JSON. Generally, each respectable server platform and language provides some ready-to-use tools or libraries for using JSON, so you don't need to write much code manually
+ check the HTTP data requests, which the browser makes in the browser's developer console. In this way you will see the exact format of the content, which is sent and received
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!