attaching context menu to headers

Is there a way to make context menus popup when right clicking on column headers? Is there a way to filter from context menus?

>>Is there a way to make context menus popup when right clicking on column headers?
While columns not activate context menu by default, you can use dhtmlxMenu functionality, which allow to attach it to any HTML container

grid=new dht…
aMenu = new dht…

aMenu.setContextZone(grid.hdr.rows[1].cells[0],“header1”);
    where grid.hdr.rows[1].cells[0] - html tag of first column

>>Is there a way to filter from context menus?
You can attach any functionality to context menu items.

Hi,
     How can I get the column Id of the column on whose header, the right click context menu was clicked ?
     Also I want the added column to have all cell colors = white and its header color = yellow;
     How to achieve this ?
    

If you attaching menu directly to HTML element - it will not provide any info related to grid structure, because it not related to grid, but just to some HTML container.

>> Also I want the added column to have all cell colors = white and its header color = yellow;
dhtmlx.com/docs/products/kb/inde … d%20column

Hi,
     I am attaching context menu to the column header, not to any other HTML object, so we can get the column id, right ?

Hi,
    Suppose I want hide the context menu of Column Header, if I don’t select any of the options and click somewhere else… How to do this ?

Context menu automatically close itself when click occurs outside of it.
You can force context menu closing by
aMenu._contextEnd();

Hi,
     I am attaching context menu to the column header, not to any other HTML object, so we can get the column id, right ?

If you are using
grid.enableContextMenu(
you are attaching context menu to the grid, so event will receive info about row|column where click occurs.

In any other case you are attaching menu to HTML element , and will not receive any additional info.
>>aMenu.setContextZone(grid.hdr.rows[1].cells[0],“header1”);
the “header1” will be received as ID of element for which context menu called