Can't upload automatically

7 posts, 1 answers
  1. Jan Michael
    Jan Michael avatar
    13 posts
    Member since:
    Oct 2008

    Posted 23 Apr 2009 Link to this post

    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

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 24 Apr 2009 Link to this post

    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.
  3. DevCraft banner
  4. Jan Michael
    Jan Michael avatar
    13 posts
    Member since:
    Oct 2008

    Posted 24 Apr 2009 Link to this post

    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
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 26 Apr 2009 Link to this post

    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.
  6. Jan Michael
    Jan Michael avatar
    13 posts
    Member since:
    Oct 2008

    Posted 27 Apr 2009 Link to this post

    Hi, it works! Thanks!

    Regards,
    Jan Michael
  7. Jan Michael
    Jan Michael avatar
    13 posts
    Member since:
    Oct 2008

    Posted 04 May 2009 Link to this post

    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
  8. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 06 May 2009 Link to this post

    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.
Back to Top
DevCraft banner