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
835
Capturing Right Click on ExplorerBar Group Header
posted

I am trying to capture the Right Click of the Group Header bar in my WebListBar so that I can popup a WebMenu.  However, the HeaderClick event is not fired on the Right Click.

 Suggestions?

  • 7694
    posted

     

    Hello,

    You are right, ClientSideEvents are not fired for HeaderClick onMouseRightClick, but you can use this solution:   

        <script type="text/javascript">

            var listBarClientID = "<%= UltraWebListbar1.ClientID %>";             

            var header1 = listBarClientID + "_Group_0_header"; // is always same

            //"_Group_0_header" is hard coded, for next group will increase with 1,

           //e.g. "_Group_1_header", "_Group_2_header", etc

          
           var headerElement = document.getElementById(header1);

           headerElement.oncontextmenu = function(e)

            {

                alert("popup menu here");            

                // cancel events for event to prevent browser

            }

       </script>