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

RadAsyncUpload add image to button

6 Answers 496 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 23 Jun 2015, 05:11 AM

I have a RadAsyncUpload , i just want to show an image on this button.Itried using

#AsyncUpload1 .ruButton
{         
   /*it is an example URL*/ 
   background-image: url("../Images/eClose.png");
}  

but no luck.

 

<telerik:RadAsyncUpload ID="AsyncUpload1" Width="5px" runat="server" Localization-Remove=""   HideFileInput="true" Skin="Office2010Silver" OnClientFileUploaded="AsyncUpload1_OnClientFileUploaded"
                    MaxFileSize="10485760" OnFileUploaded="AsyncUpload1_FileUploaded" MultipleFileSelection="Disabled" OnClientValidationFailed="validationFailed"
                    AutoAddFileInputs="false" UploadedFilesRendering="BelowFileInput">
                    <Localization Select="Attach"  />
                </telerik:RadAsyncUpload>

 

Please help

6 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 23 Jun 2015, 02:46 PM
Hi,

You may try the following approach:

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" RenderMode="Classic">
    <Localization Select="" />
</telerik:RadAsyncUpload>

Setting the Select value to an empty string would hide the text of the image. Another approach would be to try displacing the text as described in the following StackOverflow thread.

Then use the image attached to this post and add the following CSS:

<style type="text/css">
    html .RadUpload .ruButton {
        height: 26px;
        width: 78px;
        background-image: url(add.jpg);
    }
 
        html .RadUpload .ruButton.ruButtonFocus,
        html .RadUpload .ruButton.ruButtonFocus.ruButtonHover {
            background-position: -1px, -1px;
        }
</style>

As a result, you should have a custom image applied to your RadAsyncUpload.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
S
Top achievements
Rank 1
answered on 24 Jun 2015, 05:55 AM

Hi , 

Thanks , that worked.

0
S
Top achievements
Rank 1
answered on 24 Jun 2015, 10:18 AM

Hi Dimitar,

can you please help with this below issue?

 I have a usercontrol for attachments. The usercontrol has a RadAsyncUpload and a grid to show the uploaded files.But when i use this usercontrol on my main page, and upload a file, it displays the first uploaded file immediately in the grid in usercontrol.But when i upload second time , the file gets uploaded but the UI is not refreshed and the second file is not shown in the grid.Please help.I have added ajax setting to update the usercontrol on my main page on click of the RadAsyncUpload button.  <telerik:AjaxSetting AjaxControlID="AsyncUpload1">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="usrAttachments" />
             
                </UpdatedControls>
            </telerik:AjaxSetting>

0
S
Top achievements
Rank 1
answered on 26 Jun 2015, 10:22 AM
this is not working on server when i add this style in css file..please help
0
S
Top achievements
Rank 1
answered on 26 Jun 2015, 10:47 AM

this is working in chrome not on IE ON server.

this is not working on server when i add this style in css file..please help

0
Dimitar
Telerik team
answered on 30 Jun 2015, 08:53 AM
Hi,

The CSS I provided previously works in both IE and Chrome on my side, when placed in a separate CSS file.

If the CSS is working in Chrome, but not in IE, when placed in a separate CSS file, you may have hit the IE CSS files limit of 32 individual files allowed. Note that the style tag in the HTML head section is also counted as a CSS file. The issue can be fixed by placing a RadStyleSheetManager control on your page. You may refer to the Internet Explorer CSS Limits blog post for further information about the issue and how to overcome it.

And about the other issue mentioned about refreshing UI in RadGrid, is this issue still reproducible? If you are still facing it, I would suggest you to open a separate forum thread for it. This would help us keep threads as short and consistent as possible, which would result in better issues handling. Thank you in advance for your understanding.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
S
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
S
Top achievements
Rank 1
Share this question
or