PDA

View Full Version : in grid how to get combobox's filedvalue



hepx
25 Apr 2010, 11:02 PM
this is code:
var comV = [[1, 'aaa'], [2, 'bbb'],
var combox = new Ext.form.ComboBox({
store : new Ext.data.ArrayStore({
fields : ['id', 'text'],
data : comV
}),
forceSelection : true,
valueField : 'id',
typeAhead : true,
editable : false,
disabled:true,
displayField : 'text',
triggerAction : 'all',
mode : 'local',
value:null,
selectOnFocus : true
});
var cm = new Ext.grid.ColumnModel({
......
, {
header : '<div align=center>combox</div>',
dataIndex : 'deviation',
renderer : Ext.util.Format.comboRenderer(combox)
}]
});
var grid = new Ext.grid.EditorGridPanel({
width : 940,
height : 475,
frame : true,
enableColumnHide : false,
store : store,
stripeRows : true,
viewConfig : {
enableRowBody : true
},
sm : sm,
cm : cm
});
I want to grid the data were passed to the back. combobox column default value is taken valueField, but now I would like to take displayField, do not know how to set?

rogerio.carrasqueira
30 Sep 2010, 7:03 AM
Do you have fixed this issue? If yes, can you post your solution? I'm having a similar problem like yours and i'm finding for a solution. Thanks so much.