function getUserGridPanel(){
var userGridPanel = Ext.getCmp('userGridPanel');
if(!userGridPanel){
userGridPanel = Ext.create('Ext.grid.Panel',{
id:'userGridPanel',
title:'用户列表',
closable:false,
loadMask:true,
store: getUserGridStore(),
columns: [
{xtype: 'rownumberer'},
{ header: '用户名', width:150, align:'center', dataIndex: 'userForm.userName' },
{ header: '用户全名', width:200,align:'center',dataIndex: 'userForm.userFullName'},//flex: 1
{ header: '性别', width:80,align:'center',dataIndex: 'userForm.userSex',
renderer:function(sex){
if(sex == '1'){
return '男';
}else {
return '女';
}
}
}
{ header: '部门', width:150,align:'center&
ExtJs 4.1 GridPanel学习
最新推荐文章于 2019-12-25 11:48:17 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)