x
ActiveReportsJS v5.2 is Here! Check out our newest update. ActiveReportsJS v5.2 is Here! ARJS 5.2 is Here!

Is Context Menu feature available for DVJs?

Posted by: nchalla on 18 October 2019, 2:13 am EST

    • Post Options:
    • Link

    Posted 18 October 2019, 2:13 am EST

    Is Context Menu feature available for DVJs?

  • Posted 21 October 2019, 4:47 am EST

    Hi,

    There is no inbuilt support for context menu but we could easily create a context menu for the DVJS by handling the contextmenu event on its container. Please refer to the following code snippet and the sample demonstrating the same:

    dv.container.addEventListener("contextmenu", e => {
      let htinfo = dv.hitTest(e);
      if (!htinfo || htinfo.area !== "viewport") {
        return;
      }
      showContextMenu(e, dv, htinfo);
      e.preventDefault();
    });
    

    https://codesandbox.io/s/dvjs-sample-4x7n9

    Regards

    Sharad

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels