What is the "type" property ?

10 posts, 1 answers
  1. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 24 Mar 2012 Link to this post

    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
  2. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 25 Mar 2012 Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
  4. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 25 Mar 2012 Link to this post

    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
  5. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 25 Mar 2012 Link to this post

    so you are meaning like "json" or "odata" or "xml" or "jsonp"
  6. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 25 Mar 2012 Link to this post

    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
  7. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 25 Mar 2012 Link to this post

    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
  8. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 25 Mar 2012 Link to this post

    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
  9. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Mar 2012 Link to this post

    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!
  10. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 26 Mar 2012 Link to this post

    Atanas,

    Thanks for the information.

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

    Regards
  11. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Mar 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready