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

client manage RadAsyncUpload

1 Answer 36 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Sofiene
Top achievements
Rank 1
Sofiene asked on 30 Aug 2012, 07:49 AM
Hi , 
how can i  enable / disable  RadAsyncUpload control  in client side ? 

with my way that disable / enable control but when enabled you can not select file to upload , the button not work . 

<telerik:RadAsyncUpload            Width="220px"
 EnableViewState="true"
 runat="server"
 ID="AUJustificatifEnfant"
 MaxFileInputsCount="1"
  Enabled="false"
 >
    <script type="text/javascript">
               function GetValue(sender, eventArgs) {
var AUJustificatifEnfant = document.getElementById('AUJustificatifEnfant');
  
 AUJustificatifEnfant.disabled = ! (chkAutreMotivation.checked || chkEnfantBasAge.checked);
    }
        </script>



1 Answer, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 04 Sep 2012, 01:26 PM
Hello,

To enable/disable RadAsyncUpload client-side please use the "set_enabled" method:

<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server">
</telerik:RadAsyncUpload>
 
<script type="text/javascript">
    function test() {
        var upload1 = $find("<%=RadAsyncUpload1.ClientID %>");
        upload1.set_enabled(!upload1.get_enabled());
         
        }
 
</script>



Regards,
Helen
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.
Tags
AsyncUpload
Asked by
Sofiene
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or