1. #1
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Answers
    1
    Vote Rating
    0
    masoud_tamizy is on a distinguished road

      0  

    Default Answered: store.filter()

    Answered: store.filter()


    i have a grid that shows some rows . one row is : "account_id"
    why when i filter another store with this parameter , quert string is equal to this first :
    Code:
    filter:[{"property":"account_id","value":6}]
    but when i click another row of my grid for 2 ,3 , 4 .... this json increase so :
    filter:[{"property":"account_id","value":6},{"property":"account_id","value":8}]
    filter:[{"property":"account_id","value":6},{"property":"account_id","value":8},{"property":"account_id","value":11}]

    i always want latest "account_id" . i.e :
    filter:[{"property":"account_id","value":11}]

  2. It sounds like the filters are additive. You can call Ext.data.Store.clearFilter() prior to setting a new filter.

  3. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    It sounds like the filters are additive. You can call Ext.data.Store.clearFilter() prior to setting a new filter.

  4. #3
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Answers
    113
    Vote Rating
    96
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    you should use store.clearFilter() and then call store.filter() with the new filter criterion.

Thread Participants: 2