Results 1 to 2 of 2

Thread: Filtering for distinct values in a store without deleting records

  1. #1

    Default Filtering for distinct values in a store without deleting records

    Hi,

    I am stuck trying to achieve the following scenario.

    I have my JSON data as lets say:

    123 ABC 555 1
    123 ABC 555 2
    234 DEF 777 4
    345 GHI 999 2


    I want to display "ABC","DEF","GHI" in my list only once without deleting records from the store, as I have a selectfield with "1","2","4"(Column 4 distinct values)

    I also have a searchfield to further filter the list

    How can I achieve this?

    My Idea:
    To have 2 stores "hidden store" and "display store", where the "hidden store" will have all the data which will be used to filter for the selectfield which will be further iterated to the "display store" and the "display store" which consists of distinct values for displaying the list and filtering with searchfield.

    Would this approach hinder the performance of the app or is there any other easier way to achieve this?

    Thanks In Advance

  2. #2
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693
    Answers
    21

    Default

    You can define filters for your store
    http://docs.sencha.com/touch/2-1/#!/api/Ext.data.Store

    you can filter by field and values or by a custom filter function

Posting Permissions

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