View Full Version : ExtJs ext- RowEditing update button is disabled if allowBlank is set

5 Mar 2014, 11:59 AM
(sorry for my english)
I have a grid + rowEditor , and i have a col allowBlank: false
After open rowediting the update button is initially disabled. If i type any character, the update button is not change to enabled.
i have changed the example ext-\examples\grid\row-editing.js
By adding a new record with name = empty

tbar: [{
text: 'Add Employee',
iconCls: 'employee-add',
handler : function() {

// Create a model instance
var r = Ext.create('Employee', {
name: '',
email: '[email protected]',
start: Ext.Date.clearTime(new Date()),
salary: '500',
active: true

store.insert(0, r);
rowEditing.startEdit(0, 0);

after type any character, the update button reamin in disabled status.
How can I solve this? Thanks.

5 Mar 2014, 1:38 PM
This was corrected in 4.2.2. If you do not have access, you could use the following override:

Ext.define('Ext.grid.override.RowEditor', {
override: 'Ext.grid.RowEditor',

initComponent: function() {
var me = this;


me.getForm().on('validitychange', me.onValidityChange, me);

onValidityChange: function() {
var me = this,
form = me.getForm(),
valid = form.isValid();

if (me.errorSummary && me.isVisible()) {
me[valid ? 'hideToolTip' : 'showToolTip']();
me.isValid = valid;


6 Mar 2014, 10:08 AM
Thank you! Perfect.

17 Dec 2014, 7:07 AM
This fix seems to only work once. If I try to add another record, the button is greyed out, and it never even hits the onValidityChange handler. It seems as if the previous record has set the entire form to valid, so it doesn't care about the next added entry.

17 Dec 2014, 7:23 AM
FYI, I think I fixed my above issue. In the same overridden code, I added this:

completeEdit: function() {
var me = this,
form = me.getForm();

if (!form.isValid()) {
return false;

return true;

The key is that form.reset right before the return.