I want to disable the webdropdown control using javascript. How will I do it???
Plaese help !!!
I think you dint get my problem. Just check the difference between disabling label to web dropdown. It will show hover effect on mouse over eventhough it is disabled for current value(Top item).
Hi,
Do you mean hover style on the input, or on the button? You can always change the styles by modifying the CSS classes for Hover in the style libraries, i.e. for Default:
igdd_ControlHover
Hope this helps,
Angel
Sorry!
It shows hover image on mouse over. I need to avoid this. initially it is with gray colored background. How to disable hover effect when it is disabled/readonly?
I have submitted an issue request about changing style to disabled when displaymode=readonly and enabled=false. In the meantime you can easily apply disabled "effect", by setting this in the Initialize client-side event handler:
<head runat="server">
<title></title>
<style type="text/css">
.disabledDropDown {
background-color: Gray;
}
</style>
<script type="text/javascript">
function initialize()
{
var dd = $find("WebDropDown1");
if (dd.get_displayMode() == $IG.DropDownDisplayMode.ReadOnly)
dd._element.className = "disabledDropDown";
</script>
</head>
Then in the control define the initialize event:
<ClientEvents Initialize="initialize" />
In webdropdown I set enabled="false" property and displaymode="readonly". Then it does not look like fade effect like disabling an imagebutton. It shows hover image also. I need to display the webdropdown with fade effect while disabling. Immediate help is needed. Thank you in advance.