简体   繁体   中英

How to get the datatype of a kendo grid column using javascript?

How do I get the datatype of a column in Kendo Grid on the client side in Javascript/Jquery? For eg I want to know whether the column is of type text or numeric or date. I checked inside $('#kendoGrid').data('kendoGrid').columns , but it does not show any detail about the column data type.

The schema (if it was specified) is in the grid's data source. You will find it under $('#kendoGrid').data('kendoGrid').dataSource.options.schema.model.fields . This returns an array of fields that should match up to the columns in your grid. Each field has a type property. Bear in mind that Kendo UI did not intend for the schema to be accessed in this way. I'm curious to know why you need this?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM