Can someone please tell me how to disable and enable the dropdown in javascript. I don't need to cancel the value changed event or just give the appearance of being disabled, I really need it disabled, and the ability to enable it again. I need the control to be disabled\enabled when other controls on the page perform certain actions. I don't see why this has to be so hard. The help for the CSOM for the new AJAX controls is so poor in comparison to the help for the old controls it is laughable.
Hi,
You can run your own code on each page load as you subscribe to the "Initialize" client-side event of the control:
E.g:
The control setup :
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px"> <ClientEvents Initialize="InitializeHandler" /> </ig:WebDropDown>
Javascript handler:
<script type="text/javascript"> function InitializeHandler(sender, args) { // put your code here to disable the control } </script>
I can get it to work after the page is fully loaded and I click a checkbox to run the javascript, but I need it to run as the page is loaded. See my attachment for what I am looking to do.
Hi Try to do the Following :
In Your JavaScript use the Following Code:
$find('igDropdown').set_enabled(false);
where igDropdown is the ID of the WebDropDown
Thanks
This is not working for me, is there something special I need to do?
Is there a special place I need to put the javascript?
I have tried the ablove mentioned solution to diable the WebDropDown it is working as expexted i.e.
dropDown.set_enabled(false);
but however after post back
dropDown.set_enabled(fasle); is not working , kindly let me know what could be causing the issueThnaks in Advance