I want to disable the webdropdown control using javascript. How will I do it???
Plaese help !!!
Hi,
Is your question the same as this one ?:
http://forums.infragistics.com/forums/t/27316.aspx
(I assume it's the same).
What you would like to achieve is not disable the dropdown, but disable the input box inside the control. This is internal to the rendering, and is not publicly exposed. You should not do this, and even if you do, it's not guaranteed that everything will work fine.
I proposed a solution to cancel the ValueChanging client-side event - which will have the same effect, using public APIs. Did you try this?
Thanks for the feedback,
Angel
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.
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).
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,
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" />