0
我有一個模式面板,當點擊一個監聽器配置時會出現一個模式面板。 鏈接放置在網格中。問題是當鏈接被點擊時,模式顯示沒有數據。請幫忙。ExtJS模態面板沒有顯示內容
listeners : {
click : function() {
Ext.create('Ext.data.Store', {
storeId:'myStore',
fields:['qname'],
data:{'items':[
{ 'qname': 'Lisa'},
{ 'qname': 'Bart'},
{ 'qname': 'Homer'},
{ 'qname': 'Marge'}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.window.Window', {
title : 'Add Survey',
titleAlign : 'center',
id : 'surveyWindow',
height : 400,
width : 300,
//modal : true,
layout : 'fit',
closeAction:'close',
store:Ext.data.StoreManager.lookup('myStore'),
items : {
xtype : 'grid',
id :'addSurveyGrid',
border : false,
columns : [{
xtype : 'rownumberer'
},{
header : 'Survey Name',
sortable : false,
dataIndex : 'qname',
flex : 1
}]
}
}).show();
}
}
感謝它解決了我的問題!這是我犯下的一個愚蠢的錯誤。 – Sashikant 2013-05-02 19:48:36