Results 1 to 3 of 3

Thread: Getting distinct values into a combobox

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
      0  

    Default Getting distinct values into a combobox

    OK I am an extjs beginner. I have loaded up a store which I want to use for a grid. I also want to have combo boxes above the grid which filter the data. I want to use the same store to build the combo boxes; however, I cannot seem to be able to figure out how to remove the duplicate values. How do I get distinct id, name values from the store into the combobox? thanks to anyone who can help.

  2. #2
    Ext JS Premium Member gevik's Avatar
    Join Date
    May 2009
    Location
    The Netharlands
    Posts
    277
    Vote Rating
    37
      0  

    Default

    I assume your combobox is not part of the grid columns. What you could do is to implement one of the "before*" events of the combobox (I guess beforequery or expand), then use the store's "each" function and loop the store records to make a distinct list for your combobox.

    I hope this helps.

    BTW: Here is a very good guide if you are new to using the combobox component:
    http://skirtlesden.com/articles/extjs-comboboxes-part-1

    I
    hope this helps.

  3. #3
    Sencha User
    Join Date
    Jul 2015
    Posts
    19
    Vote Rating
    0
      0  

    Default

    Thanks the tutorial was very helping.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •