Field Types in Data Source Schema

3 Answers 4410 Views
Data Source
KobusVisagie
Top achievements
Rank 1
KobusVisagie asked on 06 Jul 2012, 06:58 AM
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} }
                             }
                           }
                       }
                    });

3 Answers, 1 is accepted

Sort by
0
KobusVisagie
Top achievements
Rank 1
answered on 06 Jul 2012, 07:19 AM
100%
Top achievements
Rank 1
commented on 10 Feb 2014, 01:37 PM

Where is this document nowadays?
0
Alexander Valchev
Telerik team
answered on 13 Feb 2014, 07:52 AM
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!
 
Matt
Top achievements
Rank 1
commented on 12 Jun 2015, 02:39 PM

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?

T. Tsonev
Telerik team
commented on 16 Jun 2015, 11:52 AM

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!
 
0
Alex Hajigeorgieva
Telerik team
answered on 13 Mar 2019, 10:54 AM
Hello,

Just a quick update to this thread as the Kendo UI Documentation was updated regarding the data source schema fields - the datatypes, their parsers, the editors which are automatically generated in the context of the grid:

https://docs.telerik.com/kendo-ui/controls/data-management/grid/editing#define-fields-through-schema

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Data Source
Asked by
KobusVisagie
Top achievements
Rank 1
Answers by
KobusVisagie
Top achievements
Rank 1
Alexander Valchev
Telerik team
Alex Hajigeorgieva
Telerik team
Share this question
or