我得到了本地Json数据
var MYDATA=[{"StartTime":'19:00:12.000',"StartDate":'2014-02-11',"Name":"John"},
{"StartTime":'20:09:15.000',"StartDate":'2014-02-11',"Name":"Alan"},
{"StartTime":'20:22:22.000',"StartDate":'2014-02-11',"Name":"Liza"}
];
我使kendo网格具有可排序,可分组,可过滤,可重用的特性 . 当我尝试过滤到StartTime时,它无法正常工作 . 我可以把架构模型字段类型放到时间吗?
StartTime:{ type:time}
如果我没有在架构模型中定义StartTime字段 . 剑道网格认为“它是字符串” .
我定义了日期然后在下面的列中定义它;
{ field: "StartTime", title: "Start Time" ,format: "{0:hh:mm:ss}", filterable: {
ui: "timepicker",
}}
但不过滤或在我的网格中显示 .
1 回答
不,你必须把它作为“约会” . 有效数据类型包括:“string”,“number”,“boolean”,“date” . 默认为“string” .
有效类型可在此处找到:http://docs.telerik.com/kendo-ui/api/framework/model#methods-Model.define
示例:http://jsfiddle.net/OnaBai/B8G6X/