View Full Version : Combo's store from existing Grid store[create child store from parent store]

27 Jul 2009, 11:37 PM
Hi, i have a store loaded up which populates my grid. The store uses a loader with a proxy and a reader.

I need data from one of the columns in the grid to be populated into a combobox.

Lets say one of the column in my grid is 'First Name', and all the values are being populated using one of the fields in the store's loader (let say 'firstName'). Obviously there are many more fields that the loader loads including 'firstName', to populate all the columns in the grid, but i want to use all the values of 'firstName' in all the records in the store, to be populated into a different combobox.

So, if my grid looks like:
S.No |FirstName | LastName |....
1) | Mary | Pierce
2) | Roger | Fedrer

The combobox(or its store/loader) should load data the grid's store as:
Mary |
Roger |

Please suggest how this could be achieved.

29 Jul 2009, 5:13 AM
There is no emulation on the store like 'collect' in ExtJS, but i did it with the loader here:

ModelData modelData = (ModelData) iterator.next();
Collection propertyNames = modelData.getPropertyNames();

and create a store out of these values.

29 Jul 2009, 9:12 AM
is there not a filter for the store? after filter move the items. then remove the filter.