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

Upload button disappers during upload.

3 Answers 51 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Roshil
Top achievements
Rank 1
Roshil asked on 06 Oct 2011, 10:06 AM

Hi Telerik Team

I’m facing a problem with upload control in Silverlight.  The issue is that during upload of multiple files with the control and try to validate something on upload event, if the validation is failed, the upload button disappears. We are using the e.cancel =true in the OnValidate method. And then the user cannot upload the file as the upload button is missing.

Code used

///Control

<telerik:RadUpload x:Name="radFileUploader" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"  Margin="10,0,10,10" VerticalAlignment="Bottom"

                            

                                 Filter="Image Files (*.jpg;*.jpeg;*.png)|*.jpg;*.jpeg;*.png"

                                 FilterIndex="0" MaxFileCount="5"   

                        AllowDrop="true" Width="200"

                                 IsAutomaticUpload="false"

                                 OverwriteExistingFiles="True"

                                 UploadServiceUrl="/Modules/UploadFileHandler.ashx"

                              

                        IsAppendFilesEnabled="True"

                                 FileUploadStarting="radFileUploader_FileUploadStarting"

                                 FileUploaded="radFileUploader_FileUploaded" SingleFilePerPostRequest="False" UploadStarted="radFileUploader_UploadStarted" />

 

 

 

///Constructor

public UploadIconDialog()

        {

            InitializeComponent();

            radFileUploader.AddHandler(RadUploadItem.ValidateEvent, new UploadValidateEventHandler(OnValidate));

 

        }

 

 

///Validation Method

void OnValidate(object sender, UploadValidateEventArgs e)

        {

          

            if (txtLandscape.Text == string.Empty)

            {

                MessageBox.Show("Please select a landscape", "Validation", MessageBoxButton.OK);

// Here Landscape is a mandatory field.

 

                e.Cancel = true;

             

 

            }

        }

 

 

//Attching  parameters.

private void radFileUploader_FileUploadStarting(object sender, Telerik.Windows.Controls.FileUploadStartingEventArgs e)

        {

            e.FileParameters.Add("LandscapeGuid", txtLandscape.Tag);

            e.FileParameters.Add("FileName", e.SelectedFile.File.Name);

 

        }

 

So how can I bring back the 'upload' button so the user can upload files if needed?

3 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 11 Oct 2011, 06:29 AM
Hi Roshil,

Thank you for reporting this issue. This seems to be a bug in the visual stes of the Upload control. I have logged this in our PITS under "Incorrect UI state when validating all files with the Validate event" and you can check its progress.

Greetings,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
danparker276
Top achievements
Rank 2
answered on 02 Apr 2014, 10:40 PM
Any timeline on this?
0
Pavel R. Pavlov
Telerik team
answered on 07 Apr 2014, 01:26 PM
Hi Dan,

We will try to provide a fix for the reported issue in our next official release (Q2 2014). The best way to be notified for any changes to this issue is to follow the feedback item that I exposed in our system.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Upload
Asked by
Roshil
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
danparker276
Top achievements
Rank 2
Pavel R. Pavlov
Telerik team
Share this question
or