Declined
Last Updated: 19 Oct 2021 05:39 by ADMIN
Ben
Created on: 10 Apr 2014 14:37
Category: Kendo UI for jQuery
Type: Feature Request
3
Create a standard way to handle errors in the Upload control
When using inline/batch/popup editing for grids, there is a standard way to handle server-side validation errors (from the ModelState) on the client : http://blogs.telerik.com/kendoui/posts/13-08-29/handling-server-side-validation-errors-in-your-kendo-ui-grid

When using the Upload control, the proposed solution is to use XMLHttpRequest.status and XMLHttpRequest.statusText, which is currently not very reliable, and complicated to handle. It's also a non-standard way in ASP.Net MVC, and breaks existing best-practices for error handling.

There should be a way to handle ModelState errors on upload.
1 comment
ADMIN
Ianko
Posted on: 19 Oct 2021 05:39

Hello,

Using the async mode in Upload requires the usage of XMLHttpRequest as this is the only possible way to accomplish asynchronous file upload. Otherwise, the classic mode can be used where form submission is required. However, this mode does not satisfy the requirement to be integrated into the Kendo Grid. 

As for model state validation, it is technically impossible to tie up a proper model state validation with asynchronous binding for file uploading. Currently, model state errors are handled on the client by using the unobtrusive validation MVC provides. Such an unobtrusive validation is impossible as files can be mostly validated on the server after being uploaded. 

Typically, there are a multitude of approaches to satisfy application requirements on this topic and anyone interested in some hints or advice on how to accomplish that please contact us through our support ticketing system with the exact situation and requirement you are after.

Regards,
Ianko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.