Jul 18, 2012, 2:25 PM
[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.
Thanks in advance.
Last edited by Daniil; Jul 25, 2012 at 12:57 AM.
Reason: [CLOSED]