Nov 21, 2012, 2:49 PM
[CLOSED] Date column editor triggers Store update unnecessarily
Hi,
On GridPanel cell click, I'm attaching a Date column editor as follows:
On GridPanel cell click, I'm attaching a Date column editor as follows:
column.setEditor(new Ext.form.DateField({
format:"M d, Y",
selectOnFocus:false,
listeners:{
select:{
fn:function(item,record,index){
gridRecord.set("DateValue", this.getValue());
}
},
triggerclick:{
fn:function(item,trigger,index,tag,e){
this.setValue(null);
}
}
},
triggersConfig:[
{
iconCls:"x-form-clear-trigger",
qtip:"<nobr>Set to empty</nobr>"
}
]
}));
This code works fine with a slight issue: if the cell gets focus, then no change is made and control is moved away, it still triggers Update event on the GridPanel store. Any other cell editor I've put in place don't do that. Here's the NumberField, for example:
column.setEditor(new Ext.form.NumberField({
allowDecimals:false,
allowNegative:false,
maxLength:"10",
selectOnFocus:true,
iconCls:"ux-icon-cls",
enableKeyEvents:true,
listeners:{
blur:{
fn:function(item,record,index){
gridRecord.set("IntValue", this.getValue());
}
},
keyup:{
fn:function(item,record,index){
// Enable action buttons here
}
}
}
}));
Could you please suggest what config changes are necessary to suppress this issue? Let me know if more info is required here.
Last edited by Daniil; Nov 22, 2012 at 1:00 PM.
Reason: [CLOSED]