excell type menu

Hi I had made a excell type menu:

function eXcell_menu(cell){ //excell name is defined here

if (cell){ //default pattern, just copy it

this.cell = cell;

this.grid = this.cell.parentNode.grid;


this.edit = function(){

     //_rowID = cell.parentNode.idd;

//_colID = cell._cellIndex;

var arPos = this.grid.getPosition(this.cell);

        var menu = new dhtmlXMenuObject("",“standard”);









        menu.showContextMenu(arPos[0], arPos[1]);


    } //read-only cell doesn’t have edit method

//this.isDisabled = function(){ return true; } // the cell is read-only, that’s why it is always in the disabled state


//var row_id=this.cell.parentNode.idd; //get related row id


         this.cell.combo_value = val;



    this.getValue=function(){ return this.cell.combo_value; }

    this.detach = function(){


        return true;



eXcell_menu.prototype = new eXcell; // nest all other methods from base class

I like when the user click outside of context menu it disappear, in whoch event I can make that?

Thanks a lot

By default grid stops edit process on any click outside of grid area. So you just need to handle detach method of your custom excell.
this.detach = function(){


    // code to close content menu can be added here
    return true;