PDA

View Full Version : Form load combo box problem



scaron
26 Nov 2010, 6:07 AM
Hi everyone,

I have a form and I store the value of this form in a Sql tab. In this form, i have a combobox:
xtype:"combo",
store:CategorieComboStore,
id:"categorie",
name:"categorie",
hiddenName:"ClassID",
fieldLabel:"Catégorie",
typeAhead:true,
triggerAction:"all",
displayField:"Title",
valueField:"ClassID",
editable:false,
allowBlank:false,
anchor:"100%"

It store the id into my sql table but when I try to update the form, I load the form with the data from the table and my combobox is populate with the id.

Is it possible to force the selection of the label associate to the selected id.

Thanks for you help,
Sebastien

scaron
26 Nov 2010, 6:24 AM
Forget it, I solve the problem with an autoLoad:true in my Store

Condor
26 Nov 2010, 8:05 AM
I recommend using this override (http://www.sencha.com/forum/showthread.php?75751-OPEN-42-ComboBox-s-setValue-call-with-a-remotely-loaded-Store&p=400274#post400274).