Results 1 to 3 of 3

Thread: store.filter()

  1. #1
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Answers
    1
    Vote Rating
    0
      0  

    Default 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 User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
      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
    100
      0  

    Default

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

Posting Permissions

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