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

Add more files

1 Answer 13 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Egemen
Top achievements
Rank 1
Egemen asked on 05 Dec 2013, 09:59 AM
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.

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 10 Dec 2013, 10:36 AM
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 >>
Tags
Upload
Asked by
Egemen
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or