tags:

views:

38

answers:

2

Hi,
I am using roweditor and inside the row i have a combo.
in the grid, the combo column is the symbol_id (number).
how do i make the combo/grid understand that symbol_id 22 is actually 'EURUSD'.
and force the grid display EURUSD and not 22.
Thanks.

this is my store:

'displayField' : 'symbol'
,'valueField'  : 'symbol_id'
,SimpleStore({
                     fields: ['symbol_id', 'symbol']
                     ,data: [[22,'EURUSD'],[23,'EURGBP'],[50,'USDILS']]      
})   

alt text

A: 

You can of course use a renderer for the column and pull the display value through:

renderer: function(value,metadata,record,row,col,store) {
  return record.get("symbol");
}
Lloyd
Thanks, but i get emty col.
fatnjazzy
Time to put debugger in there and see what's up. You should be able to get something back there, either from store or from record.
Lloyd
+1, this is a good answer and it should work.
Drasill
but it does not....
fatnjazzy
A: 

http://www.sencha.com/forum/showthread.php?67488-3.x-Ext.grid.ComboColumn-amp-Ext.util.Format.comboRenderer

this is the solution. Thanks anyway for trying!

fatnjazzy