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

What is the "type" property ?

9 Answers 256 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Luc
Top achievements
Rank 1
Luc asked on 25 Mar 2012, 02:12 AM
Hi,

In some sample code, namely the Grid's "Binding to remote data" sample code, we can see the following:

 $("#grid").kendoGrid({
  dataSource
: {
type
: "odata",
     transport
: {
      read
: "http://demos.kendoui.com/service/Northwind.svc/Orders"
     
},
          ...

I can't find this "type" property documented anywhere. There is a "dataType" property documented as part of the DataSource's transport's CRUD configuration. Are they related ?

Thank you

9 Answers, 1 is accepted

Sort by
0
Troy Clemons
Top achievements
Rank 1
answered on 25 Mar 2012, 02:54 PM
in the demo section for Web and Remote Data to a grid here is what it has for type.

schema: {
                               model: {
                                   fields: {
                                       OrderID: { type: "number" },
                                       Freight: { type: "number" },
                                       ShipName: { type: "string" },
                                       OrderDate: { type: "date" },
                                       ShipCity: { type: "string" }
                                   }
                               }
                           },


note the type = the data type you are retrieving.
0
Luc
Top achievements
Rank 1
answered on 25 Mar 2012, 04:14 PM
Hi Troy,

Thanks for your reply, but what you describe is not the "type" property of the DataSource object. You are describing the "type" property of fields objects.

I'm looking for a formal definition in the official documentation, so I'm bringing it to the attention of Telerik employees.

Cheers
0
Troy Clemons
Top achievements
Rank 1
answered on 25 Mar 2012, 04:16 PM
so you are meaning like "json" or "odata" or "xml" or "jsonp"
0
Luc
Top achievements
Rank 1
answered on 25 Mar 2012, 04:58 PM
Troy,

Though those may be valid values for this property, what I'm looking for is the semantics of the property itself.

Can you see it in the docs somewhere ? If so, please refer me to it.

Cheers
0
Troy Clemons
Top achievements
Rank 1
answered on 25 Mar 2012, 05:24 PM
i imagine there is nothing special about it.

it is the same as normal jquery. all your answers should be answered in normal google of jquery datatype
0
Luc
Top achievements
Rank 1
answered on 25 Mar 2012, 06:32 PM
Troy,

What you're talking about, when you refer to jQuery dataType, is the "dataType" property on the DataSource.Transport.CRUD objects, which defines the type of data you're expecting from the server for the specific CRUD operation.

There is also a "type" property on those same objects, but this one allows you to specify the type of request (GET, PUT, etc.) to use for the specific CRUD operation.

The "type" property that I'm talking about is on the DataSource object itself, not on one of its "sub-objects"

Regards
0
Accepted
Atanas Korchev
Telerik team
answered on 26 Mar 2012, 09:23 AM
Hi,

 The type of the DataSource currently can be set only to "odata". It is meant to preconfigure the DataSource with settings specific to the OData protocol. 

 The dataType is passed directly to $.ajax and is not related to the type setting of the DataSource.

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
Luc
Top achievements
Rank 1
answered on 26 Mar 2012, 11:47 AM
Atanas,

Thanks for the information.

Could you see to it that this is added to the official documentation ?

Regards
0
Atanas Korchev
Telerik team
answered on 26 Mar 2012, 01:08 PM
Hello,

 We will add this to the documentation in the next update.

Kind 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!
Tags
Data Source
Asked by
Luc
Top achievements
Rank 1
Answers by
Troy Clemons
Top achievements
Rank 1
Luc
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or