首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

ext_GridPanel1_三

2013-11-22 
ext_GridPanel1_3Ext.onReady(function(){//列模型var cm new Ext.grid.ColumnModel([new Ext.grid.RowN

ext_GridPanel1_3

Ext.onReady(function(){//列模型var cm = new Ext.grid.ColumnModel([   new Ext.grid.RowNumberer(),  {header: "姓名", width: 80, dataIndex: "Name", tooltip: "这是您的姓名"},  {  header: "性别",   width: 40,   dataIndex: "Sex",   align: "center",  renderer: function(v){  if(v == "男"){  return "<img src='../img/drop-yes.gif'>"  }   return "<img src='../img/drop-no.gif'>"  }  },  {  header: "生日",   width: 150,   format: "Y-m-d",   dataIndex: "Birthday",  renderer: Ext.util.Format.dateRenderer("Y-m-d")  },  {header: "学历", width: 80, dataIndex: "Education", align: "center"},  {id: "memo", header: "备注", dataIndex: "Memo"},  {  header: "操作",  width: 150,  dataIndex: "",  menuDisabled: true,  renderer: function(v){  return "<span style='margin-right: 10px'><a href='#'>修改</a></span><span><a href='#'>删除</a></span>";  }    }]);//准备数据var data  = [    {   name: "李赞红",   sex: "男",   birthday: Date.parseDate("1979-04-11", "Y-m-d"),   edu: "本科",   memo: "无备注"   },    {   name: "陈南",   sex: "男",   birthday: Date.parseDate("1987-08-06", "Y-m-d"),   edu: "本科",   memo: "一个小帅哥哈"   },    {   name: "易珊静",   sex: "女",   birthday: Date.parseDate("1980-05-12", "Y-m-d"),   edu: "本科",   memo: "无备注"   },    {   name: "张海军",   sex: "男",   birthday: Date.parseDate("1980-12-11", "Y-m-d"),   edu: "本科",   memo: "无备注"   },];//Proxyvar proxy = new Ext.data.MemoryProxy(data);
?

热点排行