Kendo UI:Grid中单元格日期格式化
2017-04-27 17:57
176 查看
摘自: http://blog.csdn.net/sun_jy2011/article/details/41546337
Kendo UI:Grid中怎么格式化时间类型数据?
解决方案
(1)使用format格式化
(2)使用template实现
以上两种方法都可以实现。但存在一个问题,必须把数据类型设置为date类型
Kendo UI:Grid中怎么格式化时间类型数据?
解决方案
(1)使用format格式化
{ field: "updateTime", title: "更新时间", width: 200, format: "{0: yyyy-MM-dd HH:mm:ss}" }
(2)使用template实现
{ field: "updateTime", title: "更新时间", width: 200, template : kendo.template($("#updatetime_template").html()) } <script type="text/x-kendo-template" id="updatetime_template"> #= kendo.toString(updateTime, "yyyy-MM-dd HH:mm:ss") # </script>
以上两种方法都可以实现。但存在一个问题,必须把数据类型设置为date类型
dataSource: { pageSize: 20, transport: { read: { contentType: "application/json", dataType: "json", type: "Post", url: "URL" } }, schema: { data: "rows", total: "total", model: { id: "ID", fields: { updateTime: { type: "date" } } } } }
相关文章推荐
- Kendo UI:Grid中单元格日期格式化
- dev gridcontrol 绑定int型及日期型的列默认当值为0时显示空白及格式化日期显示方式
- Extjs怎么格式化Grid的日期列
- Kendo UI:Grid中单元格为下拉框/时间控件等
- devexpress.xtragrid.views.grid.gridview 格式化单元格
- Ext.Net 中的GridPanle列中日期进行格式化
- 新增格式化单元格数据功能-dotNetFlexGrid更新1.24版本,快速的设置您的表格数据的不同样式;现在开始扔掉你的Asp.net GridView吧。
- Ext gridPanel 日期格式化
- POI Excel 01之新建Excel,创建工作簿,格式化单元格日期
- Kendo UI:Grid中单元格的数据源的设置-field选择域的问题
- 格式化grid日期
- Extjs怎么格式化Grid的日期列
- Kendo UI:Grid中单元格样式控制
- DateTimePicker 日期的格式化
- javascript Date format(js日期格式化)
- C#日期时间格式化
- js时间日期格式化封装函数
- Java日期时间及其格式化
- Extjs grid 单元格背景色
- javascript扩展date对象格式化日期时间输出(二)