View Full Version : Combobox with a remote store and rendering in a gridpanel

3 Apr 2011, 6:21 AM

I have a problem rendering a combobox with a remote store (JSonStore) in a grid panel (not editable).

For my purpose I need to pass additional parameters based on the record.
For this reason I created my own extension of the Ext.data.JsonStore implemented beforeLoad funcion to add my own args.
This is working fine when the combobox is in a panel (form panel)
But now I need to render it on a grid panel and so usually I'm using a rendering but seems that the "load" method is invoked only 1 time for grid and not for each row so I haven't a problem retrieving the right items for each row.

There is a way to force loading each row ?


3 Apr 2011, 6:27 AM
You could perhaps use a column renderer function for this, but I doubt it will be as easy it sounds as the gridpanel isn't designed to contain other Ext widgets. You could probably use a regular html select box though...

3 Apr 2011, 6:40 AM
Hi and thank you
I'm just using a renderef funtion.
And it is called.
I created a rendered like the doc having this code

record = combo.findRecord(combo, value);

It is called "N" times correctly. but the combo it seems to be instantiated only 1 time and not for each record in the grid.[/CODE]

3 Apr 2011, 12:12 PM
I had a similar issue.. I think I used a roweditor plugin which when extended can be used to your liking

3 Apr 2011, 10:09 PM
Ty Mohan

Can you post your example?

I'm not using a Ext.grid.EditorGridPanel but a simple Ext.grid.GridPanel because the grid is read-only.


4 Apr 2011, 3:33 AM
I am not sure why you would have a read-only grid and yet have a combobox editable.... roweditor wont be of much use if you are not editing any values.. perhaps you should simply have a buttoncolumn

EDIT> or a splitbuttoncolumn .. not sure if its possible.. but it should be ideal if I assume your requirements as I imagine

4 Apr 2011, 4:02 AM
Thank for you suggestion
I fix the issue in this way. In case of combobox with remote store, instead to use a remote store , I will have preloaded all possible items in a "private" store common to all records.
In this way I found a workaround to fix my situation.