Hi,
I have a grid with a sub grid. On the grid I have added the header to the ContextZone so that a context menu for the grid will display even when no records in the Grid. The code is
suppOrderGrid.hdr.id=“supporderheader”;
orderActionMenu.addContextZone(“supporderheader”);
suppOrderGrid.enableContextMenu(orderActionMenu);
This works fine. However, I want to do the same for the subgrid, and using this code
suppOrderGrid.attachEvent("onSubGridCreated",function(sub_grid_obj,rId,rInd){
sub_grid_obj.setHeader("Code,Desc,Qty,Cost,MU,Retail");
sub_grid_obj.setColTypes("ed,ed,ed,ed,ed,ed");
sub_grid_obj.setInitWidths("150,355,80,60,60,60");
sub_grid_obj.hdr.id="itemorderheader";
itemActionMenu.addContextZone("itemorderheader");
sub_grid_obj.enableContextMenu(itemActionMenu);
But this doesn’t work, when I try to use the subgrid I get the following error
‘Zone is null’
any ideas??