PDA

View Full Version : Please help me to load list-item in extjs combobox



vohuy25
29 Mar 2011, 1:49 AM
Hello all,

I'm new-bie in extjs. I am using extjs and MVC. I meet a problem below:

I used Ext.data.JsonStore to load data for combobox. after loading data to combobox, I click to the combobox and I don't see any item in item list. But when i click to the blank list (dont have any item), a item will be shown in combobox :(

here is my code:

{ xtype:'combo',
fieldLabel:'Release manager',
name:'ReleaseManager',
dataIndex:'ID',
modifiable:true,
width: 230,
listWidth: 230,
allowBlank:true,
resizable:true,
editable:false,
hiddenName:'ID',
typeAhead: true,
triggerAction: 'all',
selectOnFocus:true,
mode: 'remote',
displayField:'UserName',
valueField:'ID',
checkField:'Checked',
store:new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: RootURL+'/Release/GetUserList',
method: 'GET'
}),
url : RootURL+'/Release/GetUserList',
baseParams:{},
root:'Rows',
autoLoad: true,
totalProperty: 'TotalCount',
fields: ['ID', 'UserName']
}),
url:RootURL+'/Release/GetUserList'}

image 1: data seems to be loaded to combobox, but item list is blank
image 2: click to blank item list, a item will be shown

25385 25386


please help me... thanks a lot :)

29 Mar 2011, 4:28 AM
Does your JSON actually have properties like "ID" and "UserName" in each data object to be parsed by and displayed in the combo?