随笔-9  评论-168  文章-266  trackbacks-0

ListView 没有GridPanel那样自动递增的序列列(RowNumber({...}));
ListView 处理日期采用tbl模板显示其日期样式,GridPanel采用renderer属性+ Ext.util.Format.dateRenderer(...)函数.

ListView
{
        xtype : "listview",
        columns : [{
           header : "项目",
           width : .6,
           dataIndex : "projectnam"
          }, {
           width : .25,
           header : "发布时间",
           dataIndex:"lastdate",
           tpl: '{lastdate:date("m/d/Y")}'
           }],
        store : new Ext.data.JsonStore({
           autoLoad:"true",
           url:"/xtad/testExt/data/waitfortask.jsp",
           fields : ['projectnam', {
                  name : 'lastdate',
                  type:"date",
                  dateFormat:'m/d/Y'
             }]
          })
       }


GridPanel
{
      xtype : "grid",
      cm : new Ext.grid.ColumnModel([
        new Ext.grid.RowNumberer({
           header : "No.1"
          }), {
         header : "项目",
         dataIndex : "projectnam"
        }, {
         header : "发布时间",
         dataIndex : "lastdate",
         renderer: Ext.util.Format.dateRenderer('m d/Y')
        }]),
      store : new Ext.data.JsonStore({
       autoLoad:"true",
       url:"/xtad/testExt/data/waitfortask.jsp",
         fields : [{
            name : "projectnam"
           },{
            name : "lastdate",
            type:"date",
            dateFormat: 'm/d/Y'
           }]
        })
     }
posted on 2010-06-28 15:41 紫蝶∏飛揚↗ 阅读(1263) 评论(0)  编辑  收藏 所属分类: EXTJS

只有注册用户登录后才能发表评论。


网站导航: