PDA

View Full Version : row editing validateedit failure message



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.

mitchellsimoens
23 Mar 2012, 11:41 AM
There is no way to return it in the validateedit event. You can mark a field as invalid and show the tooltip if errorSummary is true (default)

dmp1126@gmail.com
29 Mar 2012, 5:38 AM
thanks, i was able to get the cells to validate based off of each other. doest seem as clean as it could be but it is working and i can clean it up more later if need be.

karthikeyan.vaidhyanathan-sc@airliquide.com
24 May 2017, 3:13 PM
There is no way to return it in the validateedit event. You can mark a field as invalid and show the tooltip if errorSummary is true (default)


Hi,
There is no errorSummary in cellediting. Please let me know if there any way to achieve a similar result in case of cell editing? Thanks in advance