12 May 2008 1:22 PM #1
Display ComboBox in EditorGridPanel
I got ComboBox to work in EditorGridPanel. The next thing I would like to do is to have the ComboBox to show up when the EditorGridPanel first render rather than when I click the cell, then the ComboBox show up. Is there any parameter I need to specify, or function to overwrite to implement this?
12 May 2008 2:31 PM #2
If you've got an EditorGridPanel, which instance of the ComboBox do you want to actually show? I'm going to assume that there's likely to be more then a single row in the grid, so do you want to show the first, last, one in the middle, or all? (just to note... you won't be able to show 'all' of them at the same time as it's a single object re-used for each row)
To show one, Set up a listener for the 'show' event on the grid panel. Then you can use the grids column model to display the cells editor for whichever single cell you want.'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
12 May 2008 5:32 PM #3
In my case, my EditorGridPanel holds the result from a search. Thus, the combobox should display the value return from search. Some of my colums are editable and some are not. With combobox show up when first render convey the idea that this column is editable rather to let the user try or guess it.
12 May 2008 11:02 PM #4
Thats fine. You can do that the way I've suggested. But you'll still only ever be able to show one combo box at once, so hopefully this will be enough for you.
Another sugestionis to have another visual way of showing users that the field is editable, like a special class or colour for the text in it? Might make it easier.'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
13 May 2008 9:40 AM #5
I am pretty new for Ext JS. Do you mind show me some code, especailly the part "grids column model to display the cells editor". I am a little comfused about that part because I have already set it up when I first render the grid. Do you mean don't set up the combobox editor until grid 'show' event. Please advise.
13 May 2008 9:56 AM #6
Check the API docs for
This should give you everything you need.
13 May 2008 9:59 AM #7
I'd probably go the format editable regions differently route, but another option might be to do as cat has suggested while using http://extjs.com/deploy/dev/docs/?cl...r=startEditing
8 Jul 2008 2:56 AM #8
I have the simillar problem, I want to show all comboboxes in the EditorGridPanel.
When it is first created I use startEditing() to show all combobox. But When I click combo, the rest of them became invisible.
How can I make comboboxs become visible.
thanks for your attention.
8 Jul 2008 5:59 AM #9