Add more files

2 posts, 0 answers
  1. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 05 Dec 2013 Link to this post

    Hi,

    I have an Custom RadUpload Control
    I open the filedialog and add files like this:
    RadUploadSelectedFile f = new RadUploadSelectedFile(file);
    upload.CurrentSession.SelectedFiles.Add(f);
    It works very fine.
    Add more files button is hidden for the user.
    When i re-open the file dialog.
    I'd like that the user can add more files during the upload .
    i try to do this by code like this.
     
    fileUploadContoller.RadUploadControl.PauseUpload();
    //Add more files
    ....
    RadUploadSelectedFile f = new RadUploadSelectedFile(file);
    upload.CurrentSession.SelectedFiles.Add(f);
    fileUploadContoller.RadUploadControl.PrepareSelectedFilesForUpload();
    fileUploadContoller.RadUploadControl.ResumeUpload();

    I see these files in the radupload control but ,the control don't upload
    theme. 
    or can you tell me how i can do add more files programmatically.

    regards

    Regards.

  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 10 Dec 2013 Link to this post

    Hello Egemen,

    Unfortunately the RadUpload control does not support the scenario where you are starting the UploadSession and while the upload is still not complete to add more items for upload. The PrepareSelectedFilesForUpload method resets the collection of the RadUpload control.
    The approach which you used in the code snippet below can be used to upload items programmatic-ally but once the upload session is finished. You could store the secondary selected items from the user and store them in a collection in your code-behind and once the Upload control finishes the upload of the items to programmatic-ally upload the secondary selected items.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top