Field Types in Data Source Schema

6 posts, 0 answers
  1. Gregory
    Gregory avatar
    47 posts
    Member since:
    Sep 2010

    Posted 06 Jul 2012 Link to this post

    Hi,

    I'm looking for a list in the documentation for Data Source that defines what types of fields can be defined for a configured schema. The code below is from your example here: http://demos.kendoui.com/web/grid/editing-custom.html 

    For example: UnitPrice is specified as type "number". Where can I get the list of all these types? 

    var dataSource = new kendo.data.DataSource({
                           pageSize: 30,
                           data: products,
                           autoSync: true,
                           schema: {
                               model: {
                                 id: "ProductID",
                                 fields: {
                                    ProductID: { editable: false, nullable: true },
                                    ProductName: { validation: { required: true } },
                                    Category: "Category",
                                    UnitPrice: { type: "number", validation: { required: true, min: 1} }
                                 }
                               }
                           }
                        });
  2. Kendo UI is VS 2017 Ready
  3. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 10 Feb 2014 Link to this post

    Where is this document nowadays?
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 13 Feb 2014 Link to this post

    Hello guys,

    The available options are "string", "number", "boolean", "date". The default is "string".
    They are documented in Model's API reference, section Model.define:

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Matt
    Matt avatar
    38 posts
    Member since:
    Nov 2014

    Posted 12 Jun 2015 in reply to Alexander Valchev Link to this post

    I'm trying to define a datasource for a kendo map bubble layer, and I need to have a location field, which is a LatLong like [37.52, 21.51].  

     How can I do that if there isn't a type for it?

  6. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 16 Jun 2015 Link to this post

    Hello,

    The type is used to provide default values and conversion methods. The list provided by Alex is not exhaustive and unrecognized values will be ignored.

    Also, a small correction - the default type is "default" which means that the value will sent to the transport as-is.

    Regards,
    T. Tsonev
    Telerik
     
    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