我正在研究一个简单的网格表单,它有一个组合框和数据源作为代理(如http://goo.gl/2fxP8)。组合框正确加载,但是当我尝试选择其中一个列表项时,gridform 会关闭并且组合框不会关闭。谁能帮我吗 ?
我还计划扩展组合框 onselect 函数,以便在选择列表项后动态加载其他字段。
searchField = new Ext.form.ComboBox({
store: ds,
name : 'search',
id:'search',
fieldLabel : 'Search',
displayField:'title',
typeAhead: false,
loadingText: 'Searching...',
pageSize:10,
minChars:2,
triggerAction: 'all',
width: 200,
tpl: resTpl,
itemSelector: 'div.search-item',
onSelect: function(record){
/* Set Values to other fields here */
}
}),
保存的代码是:
Ext.Ajax.request
({
url:"some url",
scope:this,
params:
{
},
success: function(objServerResponse)
{
eval("var resultSet = " +objServerResponse.responseText);
if(resultSet.isOk)
{
this.collapse();
}
else
{
}
}
});