I am using Kendo MVC Upload control. I am using it non-async mode with Multiple files marked false.
I want to use the events to control enabling/disabling the form Submit button. This works except in one case. If you select a file that fails validation, then select a new file that succeeds validation. My Submit button is still marked disabled.
This seems to be because the onSelect event fires 1st and then the onRemove event fires 2nd.
I would like to suggest it would be better for the OnRemove event fire 1st and the onSelect event to fire 2nd.
$(document).ready(function () {
$("#SubmitButton").attr("disabled", true);
});
function onSelect(e) {
if (e.files[0].validationErrors == undefined) {
$("#SubmitButton").attr("disabled", false);
} else {
$("#SubmitButton").attr("disabled", true);
};
}
function onRemove(e) {
$("#SubmitButton").attr("disabled", true);
}