extjs tabpanel 中添加gridpanel如何实现?
varstore=Ext.create('Ext.data.Store',{storeId:'gridstore',fields:['name','email','pho...
var store=Ext.create('Ext.data.Store',{
storeId:'gridstore',
fields:['name','email','phone'],
data:{'items':[
{'name':'Lisa',"email":"lisa@126.com","phone":"555-111-224"},
]
},
proxy:{
type:'memory',
reader:{
type:'json',
root:'items'
}
}
});
var gridpanel=Ext.create('Ext.grid.Panel',{
//title:
store:store,
columns:[
{text:'name',dataIndex:'name'},
{text:'Email',dataIndex:'emil',flex:1},
{text:'Phone',dataIndex:'phone'}
],
region:center
})
var tabPanel=Ext.create('Ext.tab.Panel',{
region:'center',
layout:'border',
items:[gridpanel,
{title:'tab1',html:'the first tab'}
],
//deferedRender:false,
activeTab:0
});
tab组建是在window窗体下 展开
storeId:'gridstore',
fields:['name','email','phone'],
data:{'items':[
{'name':'Lisa',"email":"lisa@126.com","phone":"555-111-224"},
]
},
proxy:{
type:'memory',
reader:{
type:'json',
root:'items'
}
}
});
var gridpanel=Ext.create('Ext.grid.Panel',{
//title:
store:store,
columns:[
{text:'name',dataIndex:'name'},
{text:'Email',dataIndex:'emil',flex:1},
{text:'Phone',dataIndex:'phone'}
],
region:center
})
var tabPanel=Ext.create('Ext.tab.Panel',{
region:'center',
layout:'border',
items:[gridpanel,
{title:'tab1',html:'the first tab'}
],
//deferedRender:false,
activeTab:0
});
tab组建是在window窗体下 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询