PDA

View Full Version : Strange behaviour with ComboBox in EditorGrid



uzzikie
27 Nov 2007, 7:32 AM
I have a working ComboBox that reads JSON data from a script in an EditorGrid.
The grid renders properly and the combobox also is able to load the data from the store.
However, upon clicking on the combobox, the default value in the combobox becomes something like
[CODE]

catacaustic
27 Nov 2007, 2:10 PM
What you are seeing is the "standard" action for a ComboBox in an EditorGrid. This happens because the EditorGrid has a "blank" value set which includes the HTML fragment that you're seeing to display the grids cell properly. When you first edit an empty ComboBox (one that hasn't had a value selected yet), the HTML fragment shows, not a nice blank input area as we'd expect. This isn't new, it's been happening ever since V 1 that I've seen, and it just seems to be accepted.

The way that I've had to get around this is by extending the ComboBox class to get rid of the HTML when there's no value. It's not that hard, and is a bit of a pain, but it's the only way that I could get around it.

uzzikie
27 Nov 2007, 5:50 PM
The way that I've had to get around this is by extending the ComboBox class to get rid of the HTML when there's no value. It's not that hard, and is a bit of a pain, but it's the only way that I could get around it.

hmm can you show me how to do that?
Perhaps you wil be kind enough to post some sample code?

sean.zhou
27 Jun 2008, 9:29 AM
I have posted one solution in
http://extjs.com/forum/showthread.php?t=29945&highlight=EditorGrid+ComboBox+%26lt%3Bdiv+class