3 Answers, 1 is accepted
0
Hello Zin,
Straight to the question. It is not possible to show only one alert message because the FileValidationFailed event is fire for every one of the invalid files. Please review the attached sample. It shows how to remove the invalid files.
All the best,
Peter Filipov
the Telerik team
Straight to the question. It is not possible to show only one alert message because the FileValidationFailed event is fire for every one of the invalid files. Please review the attached sample. It shows how to remove the invalid files.
All the best,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Vasssek
Top achievements
Rank 1
answered on 22 Aug 2012, 11:56 AM
Hello,
thanks for that example. I have declared in web.config maximal file size:
Then I couldn't use OnClientValidationFailed client side method from your example, but instead of it I need to use OnClientFileUploadFailed event. But in this method, It seems that index is undefined there.
Please help me to solve my issue, how to remove last uploaded file which has bigger size than it's defined in web.config.
Best regards
Vasssek
thanks for that example. I have declared in web.config maximal file size:
<
httpRuntime
maxRequestLength
=
"10240"
/>
Then I couldn't use OnClientValidationFailed client side method from your example, but instead of it I need to use OnClientFileUploadFailed event. But in this method, It seems that index is undefined there.
var index = $(args.get_row()).index();
Please help me to solve my issue, how to remove last uploaded file which has bigger size than it's defined in web.config.
Best regards
Vasssek
0

Vasssek
Top achievements
Rank 1
answered on 23 Aug 2012, 11:46 AM
Hello,
I've solved my issue via this code.
I hope, it helps somebody else :)
Vasssek
I've solved my issue via this code.
function ClientFileUploadFailed(sender, args)
{
args.set_handled(true);
args.get_row().style.display = "none";
}
I hope, it helps somebody else :)
Vasssek