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

Canceling the Upload

5 Answers 65 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Missing User
Missing User asked on 31 Aug 2011, 07:13 PM
Hello.

In the UploadStarted event i have some validation of the fields, if the user left any in blank i need to send him a message and cancel de upload.  i manage doing  this using the RadUpload.CancelUpload().

The problem is after validating and canceling the upload the screen with the RadUpload is still open but now with 0 files, and if the user fill the text that he left in blank before and try to upload again i get this error.

My question is, where i can implement a way to Cancel the Upload if a validation is false?

Ps: theres a screen in attach with the error.

Thanks!!!

5 Answers, 1 is accepted

Sort by
0
Missing User
answered on 01 Sep 2011, 06:56 PM
My problem is still here,

i read this article

http://www.telerik.com/help/silverlight/radupload-features-upload-validation.html

But i can't add the ValidateEvent, actualy theres no such event.

I already add the reference to the Telerik.Windows assembly.

Please i need this asap!

Thanks!
0
Petar Mladenov
Telerik team
answered on 02 Sep 2011, 03:43 PM
Hi Joao Paulo Grassi,

We followed the steps in the mentioned help article and everything worked as expected ( we used Q2 Release dlls). Could you please check out our test project and let us know if we have missed something? You only need to upload a file named "test.txt". Thank you in advance for your cooperation.

Regards,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Missing User
answered on 02 Sep 2011, 06:35 PM
Hello.

I download your sample project and  the ValidateEvent is not present for me. I think the version of my assemblies is old
(Telerik.Windows.Controls 2010.2.812.1040). The problem is, that right now i can't update the version because the project is already "online".

I create a sample project to show the error that i'm getting

To see the error follow this steps:

1 - Start the project

2 - Try to upload a File Leaving the TextBox Name IN BLANK

3 - A message shows saying that the Name is Required.

4 - Fill the text and try to upload a file Again.

5 - Bang! the error shows.

I upload the project in 2Shared, please download it.
http://www.2shared.com/file/CWXEcesa/RadUpload.html

I need to implement a validation like this, i don't know if im missing something.

Thanks again!


0
Accepted
Tina Stancheva
Telerik team
answered on 07 Sep 2011, 04:11 PM
Hello Joao Paulo Grassi,

In your case, since you're using an old release of the control and there are known issues with your scenario there, I'd recommended you a slightly different approach.

Instead of canceling an already started upload, you can handle the RadUpload.FilesSelected event to implement a validation logic, based on which to disable the Upload button until the user enters a valid value in the TextBox. Can you please examine the attached solution and let me know if this approach works for you? Thank you in advance.

All the best,
Tina Stancheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Missing User
answered on 08 Sep 2011, 01:08 PM
Hi Tina.

Thanks for your support, i check your solution and it will help me to implement my validation, and as soon as possible we will update our assemblies version.

Best Regards.
Tags
Upload
Asked by
Missing User
Answers by
Missing User
Petar Mladenov
Telerik team
Tina Stancheva
Telerik team
Share this question
or