Results 1 to 3 of 3

Thread: Adding static value to store

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    4

    Default Adding static value to store

    Hi guys,

    for a grid and a combobox I use the same store on one page. The thing is, that someone adds a value, the value is shown in the grid and in the next step the user is able to select the added value from a combobox to go on with his work.

    Now I'd like to give the user the possibility to select a None value from the combobox that has ID -1. But this value should only be seen in the combobox but not in the grid.

    Is there a possibility to handle this via filter? E.g. filter the DirectStore for the grid where VALUE != NONE and clearFilter afterwards so that every value, also the NONE value is loaded for the combobox? I tried this but it didn't work and I watched out for examples but didn't find what I needed. Perhaps you have one or can show me how to do this?

    [EDIT]
    How I call the store for the Grid looks like this:

    Code:
    xtype: 'grid',
    ...
    store: Ext.getCmp('StoreClass').myTestStore,
    columns: [
    ...
    ]
    It's nearly the same way I call the store for my combobox

    Code:
    xtype: 'combo',
    ...
    store: Ext.getCmp('StoreClass').myTestStore
    Now I don't know how to add a filter and a clearFilter.

    Thanks and best wishes,

    Jona

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    Applying a filter to the store will affect all components which reference the store; there's no way around that.

    Consider using a separate store for the Combo and the grid.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    4

    Default

    Hi (my) friend,

    thanks for your fast response. I think there's really no way out, what a pitty.

    Nevertheless, thanks a lot and best wishes,

    Jona

Similar Threads

  1. Adding static panel and list on the same card
    By robertj98 in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 19 Jul 2010, 7:27 AM
  2. GroupingStore static store problem
    By franklinjalves in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 27 Nov 2009, 10:59 AM
  3. Adding static text or html between form fields (FormPanel)
    By dwfresh in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 14 Oct 2009, 7:14 AM

Posting Permissions

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