[CLOSED] Filter a Store

  1. #1

    [CLOSED] Filter a Store

    I have a store which has a list of employee data. There are 3 columns: employeeID, name, departed (boolean). I have a (team) grid which uses a team store with 5 columns: teamID, teamName, drafterEmployeeID, correspondentEmployeeID, reviewerEmployeeID, and qaEmployeeID. Additionally, grid utilizes the row editor plugin. The grid needs to show all employee names whether the employee departed flag is true or false. I have the javascript working for that and it works as expected. The grid, when placed into edit mode, uses a drop-down of employee names for each of the (team) grid's employeeID columns. However, during the assignment process, I would like to filter my employee store so that any employee with the departed flag set to true will be unavailable (or filtered out) as an option in the dropdown. Is there a simple(simpler) way to do this? Can I simply filter the store for a "departed=false" or do I literally have to loop through the records and check every record, every time? Also, since I have type-ahead dropdowns, and each dropdown uses the same store, is there a relatively simple way to clear the typeahead but maintain the "departed=false" filtering?

    Thanks in advance.
    Last edited by Daniil; Jul 25, 2012 at 12:57 AM. Reason: [CLOSED]
  2. #2
    Hi,

    To filter the Store please use its filter method.
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store-method-filter

    To turn off the TypeAhead feautre it should be:
    TypeAhead="false"
    Though it is by default.

    It's difficult to say something concrete without a sample which would demonstrate the requirement.

Similar Threads

  1. [CLOSED] Store Filter not reflected in Grid
    By GLD in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Nov 29, 2011, 10:15 AM
  2. [CLOSED] Server side filter the store
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 26, 2011, 10:30 AM
  3. how to filter store
    By Mr.Techno in forum 1.x Help
    Replies: 2
    Last Post: Aug 29, 2011, 10:55 AM
  4. [CLOSED] Filter store on the server (in code behind)
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 01, 2010, 9:19 AM
  5. store filter clientside
    By Richardt in forum 1.x Help
    Replies: 2
    Last Post: Aug 13, 2010, 4:12 PM

Tags for this Thread

Posting Permissions