PDA

View Full Version : EditorGrid & ComboBox Confussion



fatboab
2 Feb 2008, 4:37 AM
I have an EditorGrid that has one column in it that is editable. This is rendered via a ComboBox and it all works well so far apart from one thing. When I pick a different element in the combo box, it displays the value attribute, not the display value. so if my select is:



<select name="module" id="module" style="display: none;">
<option value="0">Administration</option>
<option value="1">Workflow</option>
</select>


Then instead of getting "Administration" I get "0" displayed. How do I force it to display the display name rather than the value...?

Cheers,

Condor
2 Feb 2008, 4:40 AM
The text that is displayed in a grid cell has nothing to do with what the editor displays.
You should add a renderer function to the column that returns the text belonging to the value in the store.

fatboab
2 Feb 2008, 9:40 AM
The text that is displayed in a grid cell has nothing to do with what the editor displays.
You should add a renderer function to the column that returns the text belonging to the value in the store.

Perfect, that's just what I needed.

Thanks,