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

6 posts, 1 answers
  1. Sean
    Sean avatar
    13 posts
    Member since:
    May 2012

    Posted 27 Jan 2015 Link to this post

    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.

  2. Sean
    Sean avatar
    13 posts
    Member since:
    May 2012

    Posted 27 Jan 2015 Link to this post

    I have attached screen shots of the control before and after submit click.
  3. Kendo UI is VS 2017 Ready
  4. Sean
    Sean avatar
    13 posts
    Member since:
    May 2012

    Posted 27 Jan 2015 Link to this post

    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.
  5. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 29 Jan 2015 Link to this post

    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!
     
  6. Chris
    Chris avatar
    23 posts
    Member since:
    Nov 2003

    Posted 14 Oct in reply to Daniel Link to this post

    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

  7. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 18 Oct Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready