Nov 22, 2012, 7:33 PM
[CLOSED] DropDownField as GridPanel column editor issues
Hi,
I'm trying to assign an editor to a GridPanel column in the form of dynamically created DropDownField with an embedded TextField as follows:
Please advise or let me know if more info is needed here.
I'm trying to assign an editor to a GridPanel column in the form of dynamically created DropDownField with an embedded TextField as follows:
column.setEditor(new Ext.grid.GridEditor(
Ext.apply({
field: {
id: "DropDownField1",
xtype: "netdropdown",
triggersConfig:[{iconCls:"x-form-clear-trigger"}],
editable:false,
component:{
id:"ComponentPanel1",
xtype:"panel",
items:{
id:"Editor1",
xtype:"textfield",
enableKeyEvents:true,
selectOnFocus:true
},
layout:"fit"
},
listeners:{
expand:{
fn:function(item){
Editor1.setValue(gridRecord.get('DisplayValue'));
Editor1.focus();
}
},
triggerclick:{
fn:function(item,trigger,index,tag,e){
this.setValue(null);
gridRecord.set("DisplayValue", null);
#{ButtonReset}.enable();
#{ButtonSave}.enable();
}
}
}
}
},
{})));
The code above works for the most part with a few issues. To begin with, I can't get the focus into the underlying TextField control. Secondly, I'm getting a client side error after clicking the "Clear" trigger button and exiting the cell (the gridRecord object is valid). Lastly, I'm not sure how to have the grid record value updated automatically after editing the text in the TextField. One would think of a TextField change or keyup listener, is that correct?Please advise or let me know if more info is needed here.
Last edited by Baidaly; Nov 25, 2012 at 9:52 PM.
Reason: [CLOSED]