PDA

View Full Version : Default value in Comboxbox nested in EditorGridPanel return: <div id="ext-gen336" ...


cequal
12-12-2007, 08:51 PM
Hi all:
I create a EditorGridPanel, embed two ComboBox that would get list data from web server by JSON.It works ok. But the default value is:
<div id="ext-gen336" class="x-grid3-cell-inner x-grid3-col-2" unselectable="on">&nbsp;</div>

The source code is like :
var mygrid = new Ext.grid.EditorGridPanel({
store: badquerystore,
clicksToEdit:1,
columns: [
badquerysm,
{header: "Value", width: 180, dataIndex: 'value', sortable: true
, editor: new Ext.form.TextField({allowBlank: true})},
{header: "Type", width: 80, dataIndex: 'atype', sortable: true
,
editor: new Ext.form.ComboBox({
//allowBlank: true,
store:typeStore,
displayField:'disp_name',
valueField : 'dict_value',
typeAhead: true,
mode:'local',
value:'somevalue',
triggerAction: 'all',
lazyRender:true,
listClass: 'x-combo-list-small',
emptyText:'',
selectOnFocus:true,
width : 80
}),
renderer: //custom rendering specified inline
function(data) {
record = GetDictRecordByValue(typeStore,data);
if(record) {
return record.data.disp_name;
} else {
//return data;
return '';
}
}},


I hope the default value of the combobox is :
somevalue
But it render as empty, when selected, the value is
<div id="ext-gen336" class="x-grid3-cell-inner x-grid3-col-2" unselectable="on">&nbsp;</div>

Does anyone know what happen? Thanks.

saipkjai
11-24-2008, 08:14 PM
hi

I got exactly the same problem as described above, I have this strange <DIV class="x-grid3-cell-inner x-grid3-col-1" unselectable="on">&nbsp;</DIV> thing within the combobox whenever I start clicking onto it. Does anyone know what is the source of this problem or perhaps a fix maybe?

Thank you for your kind attention