JS Request Ext.data.Store

I plan to use http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.data.Store.html to store the table and filter the data ... For example, selling a table: Product | Branch | Quantity | Earnings | ... Suppose that the data for quantity and income is a range of values, for example: less than 100, from 101 to 200, etc., And I use ComboBox for each column to filter data: Product combobox, Filter combobox, ...

My project has a global Store for storing tables and one Store for ComboBox . I know that I can use the Select event / listener in a ComboBox to apply filters. Additionally, use the datachanged global Store to set data in other stores.

My question is: how to get / select / retrieve a column from the global repository and apply different sorting operations to set the data in each combobox repository?

Update

Example http://jsfiddle.net/jQXf7/6/

+4
source share
1 answer

I developed a solution using the collect store method and using Ext.data.ArrayReader for ComboBox Stores .

  • collect : collects unique values ​​for a specific dataIndex from this store.
  • Ext.data.ArrayReader : a data reading class for creating an array of Ext.data.Record objects from an array.

Solution: http://jsfiddle.net/jQXf7/10/ (simple implementation of one filter at a time)

+2
source

Source: https://habr.com/ru/post/1433831/


All Articles