This is a migrated thread and some comments may be shown as answers.

Popup Editor validation issue

2 Answers 325 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 03 Oct 2014, 03:30 PM
I have a grid which uses the "popup" editor.   Both fields in the editor are required.  When I clear the first field and click the "Update" button, the validation error message appears and obscures the second field on the screen.  If I type into the first field the original value that was there initially and tab out of the field, the validation error does not disappear making it impossible to see the second field in the editor (popup).  However, if I had enter anything else other than the original value back into the first field and tab out, the validation error disappears correctly.

I consider this a bug.  Is there some other place I should report bugs rather than in this forum?

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 07 Oct 2014, 04:17 PM
Hi Steve,

I was able to reproduce this case in the online demos however we will need more time to investigate it. I will forward it to the corresponding staff members for further investigation and will get back to you as soon as I have more information. Most probably tomorrow.

Please accept my apology for the inconvenience caused.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Alexander Valchev
Telerik team
answered on 08 Oct 2014, 01:25 PM
Hello Alexander,

The issue occurs because the validation is hooked up to the model set event. That is because the validation is intended to prevent model update if the new value is not valid. The validation message is not hidden because when the user enters again the same value, the set event of the model is not triggered.

As a possible workaround I can suggest to manually call the validateInput method of the validator on "blur" of the input. Please check this example:
The important part is at the edit event handler:
edit: function(e) {
  var validator = this.editable.validatable;
   
  e.container.find("[name=ProductName]").blur(function() {
    validator.validateInput($(this));
  });
}


Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or