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

Problem with RadAsyncUpload in a CommandItemTemplate

4 Answers 83 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 06 Dec 2013, 03:32 PM
I have a RadAsyncUpload control embedded inside a CommandItemTemplate, we are upgrading from RadUpload. My problem is that the button appears in the command strip of the grid, but clicking the button does not bring up the FileOpen dialog. As far as I can tell, nothing happens at all. We are subscribed to the OnItemCommand event but we don't land there when clicking the button. This works OK with the RadUpload control.
Any suggestions? Code snippet below:

<CommandItemTemplate>
                        <table class="buttonsTable">
                        <tr>
                        <td class="uploadButton">
                            <telerik:RadAsyncUpload ID="ulIosRedemptionInfo" runat="server"
                                AllowedFileExtensions="xls"
                                MaxFileInputsCount="1"
                                ControlObjectsVisibility="None"
                                OnClientFileUploaded="clientFileUploaded"
                                OnFileUploaded="dgdRedemptionFileUploaded">
                                <Localization Select="Add" />
                            </telerik:RadAsyncUpload>
                            <%--                          
                            <telerik:RadUpload AllowedFileExtensions=".xls" ID="ulIosRedemptionInfo"
                                runat="server" ControlObjectsVisibility="None"
                                OnClientFileSelected="iosRedemptionCodeFileSelected">
                                <Localization Select="Add" />
                            </telerik:RadUpload>
                            --%>
                        </td>
                        <td>
                            <asp:LinkButton ID="lbtnRefresh" runat="server" OnClick="lbtnRefresh_Click" Visible="false"><img style="border:0px;vertical-align:middle;position:relative;padding:0;" alt="" src="<%=this.ResolveUrl("~/Images/toolbar/refresh_grey_16.png")%>" /> Refresh</asp:LinkButton
                            <asp:LinkButton ID="lbtnInspect" runat="server" OnClientClick="showInspectWindow(); return false;" Visible="false"><img style="border:0px;vertical-align:middle;position:relative;padding:0;" alt="" src="<%=this.ResolveUrl("~/Images/toolbar/inspect.png")%>" /> Inspect</asp:LinkButton>                                
                            <asp:LinkButton ID="lbtnDelete" runat="server" Visible="false" OnClick="lbtnDelete_Click"
                                OnClientClick="return blockConfirm('Are you sure you want to delete these purchase orders?', event, 450, 100,'','Application Policy > Redemption Code');"><img style="border:0px;vertical-align:middle;position:relative;padding:0;" alt="" src="<%=this.ResolveUrl("~/Images/toolbar/delete.png")%>" /> Delete</asp:LinkButton>
                        </td>
                        </tr>
                        </table>
                        </CommandItemTemplate>

4 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 11 Dec 2013, 12:11 PM
Hi David,

There is no reason for not opening the OpenFile Dialog. Please verify that there are no javascript errors on the page and there are no other html elements rendered over the RadAsyncUpload.

Regards,
Hristo Valyavicharski
Telerik
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 the blog feed now.
0
David
Top achievements
Rank 1
answered on 11 Dec 2013, 01:50 PM
Turns out the FileOpen dialog does open under Chrome and Firefox - so it may be something in the CSS styling.
0
David
Top achievements
Rank 1
answered on 11 Dec 2013, 02:47 PM
Further turns out that commenting the line for "position: relative" fixes the issue for me - and doesn't materially affect the actual appearance. If you can offer any clues as to why that works it would be appreciated for my own education.

    div.RadUpload .ruButton
    {
        background-image: url('../Images/toolbar/new.png') !important;
        background-position:left bottom;
        background-repeat:no-repeat !important;
        border: solid 0px black;
        text-align: right;
        background-color:transparent;
        font-size:13px;
        cursor:pointer !important;
        display:inline; 
        /*position:relative; */
        padding:0; 
        min-width:50px;
        max-width:50px;
        color:Black; 
        vertical-align:text-bottom !important; 
    }
0
Hristo Valyavicharski
Telerik team
answered on 16 Dec 2013, 12:58 PM
Hi David,

Probably there is another element, which is positioned in front of the RadAsyncUpload when "position: relative" is not commented out and click on it instead of the AsyncUpload. Easy way to check that is to use Firefox's built-in Inspector. It has a 3D View and shows all elements in a nice way.

Regards,
Hristo Valyavicharski
Telerik
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 the blog feed now.
Tags
AsyncUpload
Asked by
David
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
David
Top achievements
Rank 1
Share this question
or