Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
WebDropDown Server side afterClose event
posted

Hi,

 

Please let me know is there any afterClose event on the server side as we do have on the client side??? is server side event fired on webdropdown close. I have tried selectionChanged and Valuechanged event but I am using Multi Select Option and want to fire event only when all the itmes are selected and user close the drop down. Please let me know...... I have seen the client side event..

 


 

 

Parents
  • 24671
    Suggested Answer
    posted

    Hi,

    There is no server side event for closing of the dropdown. There is a solution, though, you can use the client-side event DropDownClosed, and trigger an async postback manually. 

     

        <script type="text/javascript">

        function dropDownClosed(sender , args)

        {

            var cbo = sender._callbackManager.createCallbackObject();

            sender._callbackManager.execute(cbo, true);

        }

        </script>

    And here is the markup :

     <ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px" 

            onselectionchanged="WebDropDown1_SelectionChanged">

        <ClientEvents DropDownClosed="dropDownClosed" />

        </ig:WebDropDown>

    Also make sure you have EnableClosingDropDownOnSelect=false, so that dropdown is not automatically closed as soon as you select something (otherwise with the above code you will get postbacks for every checkbox click / selection). 

Reply Children
No Data