Results 1 to 4 of 4

Thread: Add option to combobox without affecting the Store

  1. #1
    Sencha User
    Join Date
    Sep 2017
    Posts
    20
    Answers
    3

    Default Add option to combobox without affecting the Store

    Hey guy sI have this combo box

    Code:
    {
                xtype: 'combobox',
                margin: '0 0 0 10',
                fieldLabel: 'Estado',
                editable: false,
                displayField: 'ETS_DESCRIPCION',
                store: 'Estado',
                valueField: 'ETS_CODIGO'
            },
    I want to add another option (Lets say something like "All" or "None") but I cannot add it directly to the store because I use the store in others pages. I just need to add it to this combo box specifically.

    Any ideas?

    Thanks

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892
    Answers
    41

    Default

    Maybe you could use a chained store chained off of the shared one.

  3. #3
    Sencha User
    Join Date
    Sep 2017
    Posts
    20
    Answers
    3

    Default

    Quote Originally Posted by Animal View Post
    Maybe you could use a chained store chained off of the shared one.
    I thought about creating another Store with the same data but it doesn't look so good, is not there a simpler solution?

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892
    Answers
    41

    Default

    A chained store is simple. Just create it with a source of the source store, and that's it,

Similar Threads

  1. How to reload Combobox with <option></option> ?
    By saucompeng in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 10 Feb 2011, 1:12 AM
  2. Store option add=true + ComboBox problem
    By fliptight in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 9 Nov 2010, 8:19 AM
  3. Adding a "show all" option to a combobox+store
    By seltzlab in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 17 Jun 2010, 2:33 AM
  4. Combobox: How to reload option-items without expand combobox
    By digiparden in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 14 Oct 2008, 3:31 AM

Tags for this Thread

Posting Permissions

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