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

Regarding RadAsyncUpload control

8 Answers 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Somnath
Top achievements
Rank 1
Somnath asked on 11 Sep 2012, 08:52 AM

Hi Team,

I want multiple selection of files and also i want to filter files  so i am using RadAsyncUpload instead of RadUpload. But i am using it in radtoolbar itemtemplate like this :

 

 

 

<telerik:RadToolBarButton Value="Upload1">

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadAsyncUpload runat="server" ID="rupfFile" AllowedFileExtensions="sqx,sqm,xls,xlsx"

 

 

 

MultipleFileSelection="Automatic" Localization-Select="Upload" Width="280"  >

 

 

 

 

</telerik:RadAsyncUpload>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadToolBarButton>

But RadAsyncUpload looks different from its other toolbar buttons as attached file. So what i am trying to do is on click of radtoolbarbutton i will call radasynuploadbutton.click(). But it has no such event like radupload.
 Do we have any other option to solve my problem ?

 

8 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 14 Sep 2012, 07:20 AM
Hi Somnath,

 
Here is one way to open the select window of RadAsyncUpload by using jQuery:

function OnClientClicked(sender,args) {
     
   $telerik.$(".ruFileInput").click();
}

Hope this will be helpful.

Greetings,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Somnath
Top achievements
Rank 1
answered on 18 Sep 2012, 08:47 AM
Hi

But y doesnot it work on IE ???
0
Plamen
Telerik team
answered on 19 Sep 2012, 11:39 AM
Hi,

 
This behavior can not be achieved in the Silverlight Upload Module that is why if you want it to work properly in IE you will have to add the following javascript code of set the DisablePlugIns="True" property:

Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function () { return false; }

Hope this will be helpful.

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Somnath
Top achievements
Rank 1
answered on 20 Sep 2012, 01:08 PM
Its working fine now in IE,
But now i am getting this error after selecting the file. (attached image file)

Following is my code:
This is control in the page.

 

 

1) <telerik:RadAsyncUpload runat="server" ID="rupfFile1" AllowedFileExtensions="sqx,sqm,xls,xlsx"

 

 

 

MultipleFileSelection="Automatic" Localization-Select="Upload" OnClientFilesUploaded="onClientFilesUploaded"

 

 

 

EnableInlineProgress="false" DisablePlugins="True"></telerik:RadAsyncUpload>

 

 

 

2) <telerik:RadToolBarButton Text="Upload" runat="server"

 

 

 

 

 

 

 

ClientIDMode="Static" Value="Upload" CommandName="Upload">

 

 

 

 

 

 

 

</telerik:RadToolBarButton>

3) On click of toolbar button i have called

 

$telerik.$(

 

".ruFileInput").click();

 

 

 

0
Plamen
Telerik team
answered on 21 Sep 2012, 10:41 AM
Hi Somnath,

 
I have inspected the issue once again and it seems that IE does not support programmatical clicking  
on a file input by default as explained in the forum. Please excuse me for misleading you with wrong information in the beginning.

Hope this will explain the issue.

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Somnath
Top achievements
Rank 1
answered on 24 Sep 2012, 09:21 AM
Hi,
As you said it will not work in IE. So i have used it inside radtoolbarbutton

 

 

<telerik:RadToolBarButton Value="Upload1" PostBack="false">

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadAsyncUpload runat="server" ID="rupfFile" AllowedFileExtensions="sqx,sqm,xls,xlsx"

 

 

 

MultipleFileSelection="Automatic" Localization-Select="Upload" OnClientFilesUploaded="onClientFilesUploaded"

 

 

 

OnClientFileSelected="fileSelected" EnableInlineProgress="false" >

 

 

 

</telerik:RadAsyncUpload>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadToolBarButton>

But,there are some design issues.
When i select multiple files the background image of Radupload goes down some stpes below the control and radbutton disppears.when files are uploaded it comes back to its position.

Please find the attached files according to the  same order.

 

0
Plamen
Telerik team
answered on 26 Sep 2012, 02:55 PM
Hi Somnath,

 
Thank you for contacting us again.

I have inspected the code that you shared and the images attached and it seems that this issue is caused by the custom image you are using together with it. One possible solution I could think of is to hide it in OnClientFileUploading event and make it visible again in the OnClientFilesUploaded.

Hope this will help you solve the issue. If you have more questions I will be glad to assist you again.

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Somnath
Top achievements
Rank 1
answered on 28 Sep 2012, 08:24 AM
Thanks Plamen
Tags
General Discussions
Asked by
Somnath
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Somnath
Top achievements
Rank 1
Share this question
or