billsalvucci
17 Oct 2012, 10:45 AM
I have the following column in a gridpanel
{
xtype: 'gridcolumn',
dataIndex: 'name',
tdCls: 'searchable',
text: 'Account',
editor: {
xtype: 'textfield',
validateOnBlur: false,
validateOnChange: false,
allowBlank: false
}
}
I am using a roweditor on the gridpanel
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
ptype: 'rowediting',
pluginId: 'accountsRowEditingPlugin',
listeners: {
canceledit: {
fn: me.onGridroweditingpluginCanceledit,
scope: me
}
}
})
]
when I click my Add button whose handler is
var grid = Ext.ComponentManager.get('accounts');
var rowEditing = grid.getPlugin('accountsRowEditingPlugin');
rowEditing.cancelEdit();
var a = Ext.create('CrmApp.model.Account');
var store = Ext.getStore('AccountStore');
store.insert(0, a);
rowEditing.startEdit(0,0);
I immediately get a validation error dialog "the field is required", before the user is given a chance to enter anything.
Any idea why this is firing and how I can prevent it?
{
xtype: 'gridcolumn',
dataIndex: 'name',
tdCls: 'searchable',
text: 'Account',
editor: {
xtype: 'textfield',
validateOnBlur: false,
validateOnChange: false,
allowBlank: false
}
}
I am using a roweditor on the gridpanel
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
ptype: 'rowediting',
pluginId: 'accountsRowEditingPlugin',
listeners: {
canceledit: {
fn: me.onGridroweditingpluginCanceledit,
scope: me
}
}
})
]
when I click my Add button whose handler is
var grid = Ext.ComponentManager.get('accounts');
var rowEditing = grid.getPlugin('accountsRowEditingPlugin');
rowEditing.cancelEdit();
var a = Ext.create('CrmApp.model.Account');
var store = Ext.getStore('AccountStore');
store.insert(0, a);
rowEditing.startEdit(0,0);
I immediately get a validation error dialog "the field is required", before the user is given a chance to enter anything.
Any idea why this is firing and how I can prevent it?