I noticed the new webdropdown is missing a cool feature, click event, the listdropdowncontainer is only displayed now when user clicks in the button arrow, but if the user click in the items section, it doesnt display
in previous version it displayed, 11.1
tanks
Hello,
In case you would like to use it, it is possible to implement similar functionality. One approach that comes in mind is using jQuery for example and handling the input click event to open the WebDropDown container. Keep in mind, it will require you to ensure the DOM is existing when attaching to the input(https://api.jquery.com/ready/)
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(document).ready(function () { $(".igdd_ValueDisplay").click(function () { ig_controls.WebDropDown1.openDropDown(); }); }); </script></head>
<body> <form id="form1" runat="server"> <div> <ig:WebScriptManager ID="WebScriptManager1" runat="server"></ig:WebScriptManager> <ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px" DisplayMode="DropDown"> </ig:WebDropDown> </div> </form></body></html>
thanks,
it does work fine, except that the list stay open and doesn't close with another click,
maybe using the CloseDropDown function ? but when to call this function, ?
Hello,Well, in case you would like to achieve a toggle* effect when clicking the input and close the WDD container in case it is already opened, I suggest implement this using an appropriate for your application approach. For example, such approach could be to check if the DropDownList container is hidden and only then opening the WDD and close it in the other scenario.
<script> $(document).ready(function () { $(".igdd_ValueDisplay").click(function () { if (($(".igdd_DropDownList").is(':hidden')) == true) { ig_controls.WebDropDown1.openDropDown(); } else { ig_controls.WebDropDown1.closeDropDown(); } }); });
thanks Sir,
your sample works fine the first time, after a postback it doesn't work, any idea ?
I could not reproduce the issue described on post back. I am attaching a code sample for reference.