1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    36
    Vote Rating
    0
    Sneha004 is on a distinguished road

      0  

    Default Answered: Retrieving duplicate value from Json file into ComboBox

    Answered: Retrieving duplicate value from Json file into ComboBox


    Hi,

    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.....................

  2. Code:
    var hash = {};
    var value;
    store.each(function(record){
        value = record.get('field');
        if(hash[value]) store.remove(record);
        hash[value] = true;
    })

  3. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Code:
    var hash = {};
    var value;
    store.each(function(record){
        value = record.get('field');
        if(hash[value]) store.remove(record);
        hash[value] = true;
    })

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    36
    Vote Rating
    0
    Sneha004 is on a distinguished road

      0  

    Default


    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 ?

    Thanks.............

  5. #4
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    @Sneha004,

    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.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi