开发者

ExtJs Combo selectedValue

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,'开发者_JS百科EURUSD'],[23,'EURGBP'],[50,'USDILS']]      
})   

ExtJs Combo selectedValue


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");
}


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜