ExtJs gridPanel Column 时间格式化

var panel = new Ext.container.Viewport({
items: {
xtype: 'gridpanel',
id: 'gridPanel',
store: store,
height: document.documentElement.clientHeight,
columns: [
{ header: "Id", hidden: true, flex: 1, sortable: false, dataIndex: 'Id' },
{ header: "标题", width: 250, sortable: false, dataIndex: 'Title' },
{ header: "内容", width: 420, sortable: false, dataIndex: 'Contents' },
{ header: "点击数", width: 80, align: 'center', sortable: false, dataIndex: 'ClickCount' },
{ header: "发表时间", width: 150, align: 'center', sortable: false, dataIndex: 'CreateTime',
renderer: function (value) {
return eval("new " + value.split('/')[1]).Format("yyyy-MM-dd HH:mm:ss");
}
}
],
loadMask: true,
disableSelection: true,
viewConfig: {
stripeRows: true
},
tbar: ['->',
{ id: 'btn_add', text: '添加', icon: '../../../Images/extjs/add.png' },
{ id: 'btn_edit', text: '编辑', icon: '../../../Images/extjs/pencil.png' },
{ id: 'btn_delete', text: '删除', icon: '../../../Images/extjs/delete.png' }
],
dockedItems: [{
xtype: 'pagingtoolbar',
store: store,
dock: 'bottom',
displayMsg: '显示 {0} - {1} ,共 {2} 记录',
displayInfo: true
}]
}
});

  

上一篇:lpad函数


下一篇:mysql-5.5 for linux源代码安装