DHX Grid: setContextZone for Column context menu.

Hi there,

What will be zoneId for creating the column menu i.e. context menu for Column header in grid.

In v1.6 I used

for (var i = 0; i < mygrid.getColumnsNum(); i++) {



for assigning zone for Column Header Context Menu.

But since setContextZone is not available for v21. I tried using addContextZone(zoneId) function.

Now I am wondering what will be zoneId in this case because “mygrid.hdr.rows[1].cells[i]” is not an Id

infact its an object so I am getting zone is null when I tried running this example.

Please provide the solution asap. (If possible provide an example for context menu for v2.1)


in this case you can define header id - and addContextZone method will be available:

mygrid.hdr.id= “h_cmenu”;