View Full Version : Retrieving duplicate value from Json file into ComboBox

29 Feb 2012, 3:40 AM

I am trying to remove duplicate value from ComboBox which is loading the data from Json file for a particular column.

Unfortunately I am unable to solve this one.

Can anyone give me the solution for this ?

Thanks in advance.....................

29 Feb 2012, 4:37 AM
var hash = {};
var value;
value = record.get('field');
if(hash[value]) store.remove(record);
hash[value] = true;

29 Feb 2012, 11:42 PM
Thanks vietits,,

I got your statements.
I was trying to implement this code in button handler because when I click on the button the value will be populated into the combo box but not the duplicate value.
But it was showing duplicate values

Can you give some hint that where I should implement the code ?


1 Mar 2012, 12:15 AM

I am not sure to clearly understand your request. Do you mean the data you load to combobox is not duplicated but it shows the duplicated values? If so, try to remove the old data from the combobox before loading the new one.