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

Unable to enable RadAsyncUpload

2 Answers 133 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Payal
Top achievements
Rank 1
Payal asked on 23 Jun 2014, 08:11 AM
What i am trying to do is the RadAsyncUpload control is disabled by default and on selection of an item from Combobox i want to enable RadAsyncUpload control. for this i am calling an javascript. it enables the RadAsyncUpload control but not the control is not actually working as RadAsyncUpload control

here is the javascript:

  function ddlDocTypeOnClientSelectedIndexChanged(sender, args) {
     
        var Uploader = $find("<%= rdFileUpload.ClientID %>");
      
        Uploader.set_enabled(true);
      
    }

Please let me know what I am missing here.


2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jun 2014, 11:10 AM
Hi Payal,

As a work around please try to disable the RadAsyncUpload from the JavaScript as follows.

ASPX:
<telerik:RadComboBox ID="rcboItemList" runat="server" EmptyMessage="select" OnClientSelectedIndexChanged="enableUpload">
    <Items>
        <telerik:RadComboBoxItem Text="Enable Upload" />
    </Items>
</telerik:RadComboBox>
<telerik:RadAsyncUpload ID="rasyncuploadAllFiles" runat="server">
</telerik:RadAsyncUpload>

JavaScript:
function pageLoad() {
    var upload = $find("<%=rasyncuploadAllFiles.ClientID%>");
    upload.set_enabled(false);
}
function enableUpload(sender, args) {
    var upload = $find("<%=rasyncuploadAllFiles.ClientID%>");
    if (args.get_item().get_text() == "Enable Upload") {
        upload.set_enabled(true);
    }
}

Thanks,
Shinu.
0
Payal
Top achievements
Rank 1
answered on 23 Jun 2014, 11:31 AM
Hi Shinu,

Thanks for the workaround..it resolved the issue.
Tags
AsyncUpload
Asked by
Payal
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Payal
Top achievements
Rank 1
Share this question
or