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

[Solved] Can't upload automatically

6 Answers 178 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jan Michael
Top achievements
Rank 1
Jan Michael asked on 23 Apr 2009, 10:15 AM
Hi Telerik Team,

Here's my scenario:
When a file has been selected on this uploader, a popup message will come out with a yes/no button. When clicking on 'yes' button, I call the method RadUpload1.StartUpload();  to start the uploading. This works perfectly.
Doing same scenario above while uploading is in progress, the uploader stops and doesn't upload automatically.

I check/debug it already, seems to be the current file in progress is still in my uploader control, which is not correct because I already browse a new file.

What I'm trying now is to capture the browse button event to reset the currentsession file. Is there a way to capture this?

P.S: I cant used the IsAutomaticUpload  because I have a popup message that will come out before the uploading start.

Regards,
Jan Michael

6 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 24 Apr 2009, 03:04 PM
Hi Jan Michael,

You can find more information about how to work with the current upload session here:
http://www.telerik.com/help/silverlight/working_with_the_current_upload_session.html
If you need the files to be uploaded automatically after the user selects them you have to set the IsAutomaticUpload property to True.
If you manage the uploading functionality using your own code then you will have to check if the current file is still uploading or has been already uploaded. If in progress, then you will have to add some code to manage Start/Stop uploading.

I hope that this will help you.

All the best,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jan Michael
Top achievements
Rank 1
answered on 24 Apr 2009, 07:51 PM
Thanks for the prompt reply. Is there way that I can disable the browse button while there's a currently uploading files?

Regards,
Jan Michael
0
Miroslav
Telerik team
answered on 26 Apr 2009, 02:29 PM
Hi Jan Michael,

Currently there is no property that can be used to easily do this. It is a good suggestion though and we will consider it for the next versions.

As a workaround, you can access the "Browse" button of the RadUpload and disable it like so:

var firstChild = VisualTreeHelper.GetChild(uploadControl, 0) as FrameworkElement;  
var browseButton = firstChild.FindName("BrowseButton"as Button;  
browseButton.IsEnabled = false

Please note that this relies on the name of the template part and it may change in future versions (although it is unlikely) so this may be an unexpected breaking change.

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jan Michael
Top achievements
Rank 1
answered on 27 Apr 2009, 05:02 AM
Hi, it works! Thanks!

Regards,
Jan Michael
0
Jan Michael
Top achievements
Rank 1
answered on 04 May 2009, 09:46 AM
Hi, is there a way I can get the name/id of the (X) close button in the current upload item? I need to access the property to hide that button (just like the browse button). Thanks!

Regards,
Jan
0
Accepted
Miroslav
Telerik team
answered on 06 May 2009, 11:12 AM
Hi Jan,

In this case it is best to change the template of the RadUploadItems, since writing code for this will be much harder.

I have attached a project where I have done just this. The there is an element "IconDelete" which I have collapsed, this is the (X) you are talking about I suppose.

Kind regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Upload
Asked by
Jan Michael
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Jan Michael
Top achievements
Rank 1
Miroslav
Telerik team
Share this question
or