PDA

View Full Version : Combobox Values not rendering !!



AJAIN32
27 May 2014, 2:52 AM
Hi,

I am creating a combobox having a store and i am not able to populate the values in the combobox.

the store is having data which have A, B , C three fields, and C is a array of code text pair.

I want to associate text of code text pair as display field in combo and A as Value field in combo.
But data is not getting populated.

I have also tried with the field mapping. ie. in code of the store - in Field configuration

{name: 'Text', mapping: 'C.Text'}

But it does not worked.

Can anyone please tell me that to render data on a combobox can we have only codetext pair or we can use complex data also. ??

Thanks,
Ankit

alexander.urban
27 May 2014, 4:51 AM
Use http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.form.field.ComboBox-cfg-displayField and keep in mind that JavaScript is case sensitive.

AJAIN32
27 May 2014, 5:36 AM
Thanks for replying,

I know about display field and case sensitivity of java script.

My problem is bit different, please read the question again, its about how we can populate the dropdown values with a code-text pair object, and the value fied i want is outside the code-text pair !!

Please help !!