DataView: show context menu after select

Is it possible to open the context menu when a clicking on an item in the dataview?

This code will open the context menu when mousing over the item:

  dv.attachEvent("onMouseMove",function(id,e){
    cMenu._doOnContextBeforeCall(e,{id:id});
    this.select(id);
    return true;
	});

Can something similar be done in an onAfterSelect event?

Hi
You can try something like this:

data.attachEvent("onItemClick", function (id, ev, html){ //debugger; window.setTimeout(function(){ menu.showContextMenu(ev.clientX, ev.clientY); }, 1) return true; });
Click event call select event, that is why menu is clodes after item selection and you can’t see it

This is working great. I made a slight variation as:

  dv.attachEvent("onItemClick", function (id, e, html){ 
      window.setTimeout(function(){cMenu._doOnContextBeforeCall(e,{id:id});}, 1)
      return true;
  });

Thank you for your help. You’ve made some very nice tools.

You are welcome! :slight_smile: