dmp1126@gmail.com
23 Mar 2012, 4:51 AM
I have a row editor that is validating the row properly, but i have not been able to find a way to return an error message if it fails the validation. Currently it will not submit the record to be commited if it fails , but wont give the user any indication of why the validation failed.
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
listeners:{
'validateedit': function(editor, e) {
var total = 0;
subFunctions.each(function(subFun,subFunIndex){total = total + e.newValues[subFun.get('name')];})
if((e.newValues['appropriationPercent'] > 0 && total == 100) || (e.newValues['appropriationPercent'] == 0 && total == 0))
{
return true;
}
else
{
console.log(editor);
return false;
}
},
Ive been searching for the past day and a half and so far have not found anything that has helped me resolve this issue.
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
listeners:{
'validateedit': function(editor, e) {
var total = 0;
subFunctions.each(function(subFun,subFunIndex){total = total + e.newValues[subFun.get('name')];})
if((e.newValues['appropriationPercent'] > 0 && total == 100) || (e.newValues['appropriationPercent'] == 0 && total == 0))
{
return true;
}
else
{
console.log(editor);
return false;
}
},
Ive been searching for the past day and a half and so far have not found anything that has helped me resolve this issue.