You can try to create a widget programmatically (if you havenโt already), and then just call your method after calling startup () (It seems strange to call startup () manually, but the example that it shows in the original comments shows a call to grid.startup () manually).
<script type="text/javascript">
var grid = new dojox.grid.EnhancedGrid({plugins : {nestedSorting: true, dnd: true, indirectSelection: true,
menus:{headerMenu:"headerMenuId", rowMenu:"rowMenuId", cellMenu:"cellMenuId",selectedRegionMenu:"selectedRegionMenuId"}},
... }, dojo.byId('gridDiv'));
grid.startup();
connectExpandos();
</script>
source
share