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

Kendo HTML UI controls not sending after returning from server based error

5 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 27 Jan 2015, 11:28 AM

I am using jquery.validation 1.13 and kendo.web.js v2014.1.416

So, I have used Kendo Datepicker and Dropdown list on some of controls on my forms.
I have put some validations on the controls on server side, and added errors for the property if the values are not valid.
So when the server returns with error, the error on the specific properties are shown properly.
Now, when i enter values on the property and submit the form, the values (for properties with error only) are actually not being sent at all.

I am Using MVC .NET 5
eg:

ModelState.AddModelError("EndDate", "End Date cannot be earlier than today.");


Under careful inspection I found that, just when I click submit, the property control is being removed from the DOM. That is the cause of null data being sent.
- The values are being sent the first time.(before validation, even with client side validation).
- The values are not being sent for validation error input properties only(after server side validation error).

This specifically happens only on controls with Kendo UI,I have not checked with other Jquery UI plugins. The reason i am saying this is because, without use of the UI plugins the controls works properly and submits user data after error from server.

Hope i am clear with the problem.
Thank you.

5 Answers, 1 is accepted

Sort by
0
Sean
Top achievements
Rank 1
answered on 27 Jan 2015, 12:12 PM
I have attached screen shots of the control before and after submit click.
0
Sean
Top achievements
Rank 1
answered on 27 Jan 2015, 12:22 PM
This is what happening in DOM

After Error, before submit
<span class="k-widget k-datepicker k-header input-validation-error">

After submit Click
<span class="k-widget k-datepicker k-header input-validation-error" style="display: none;"></span>

for now i can override submit function and remove 'input-validation-error' from the span... but would like a more generic way to handle this problem.
0
Accepted
Daniel
Telerik team
answered on 29 Jan 2015, 08:52 AM
Hello Sean,

This is a known issue that is described here. The possible solutions are to remove the class from the widgets wrappers:
$(function () {
    $(".k-widget").removeClass("input-validation-error");
});
or implement client-side validation.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Chris
Top achievements
Rank 2
answered on 14 Oct 2016, 08:07 PM

Has there been any progress on this?  Is it even on the roadmap?  Been some time now that this has been a known issue.  I don't feel like this workaround is a very good one as I loose the visual that the class should provide.

Thanks

0
Daniel
Telerik team
answered on 18 Oct 2016, 04:31 PM
Hello,

I am afraid that adding a built-in fix is not currently planned. Even if a fix is included, the only thing that we can do on our side is not copy the specific class to the wrapper so the result will be the same as with the workaround.

Regards,
Daniel
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
General Discussions
Asked by
Sean
Top achievements
Rank 1
Answers by
Sean
Top achievements
Rank 1
Daniel
Telerik team
Chris
Top achievements
Rank 2
Share this question
or