Hello,
I have this code to generate child grids, but the context menu only works with the first child grid that is expanded:
function detailGridDataDimensionesCOFs(e)
{
var data = e.data.CuentasDimensionesCOFRows;
var idControl = e.model.clientId.replace("_ctl01_GdcCOFsDimensiones", "");
idControl = idControl + "_ctl00_HFColumnasAsignaciones";
var result = document.getElementById(idControl).value;
var Columnas = JSON.parse(result);
var CM = [];
if (COSoloLectura())
{
CM = [TextoEDITARFORMULAS, TextoVERASIGNACION] ;
} else {
CM = [TextoEDITARFORMULAS, TextoVERASIGNACION, TextoELIMINARESTEIMPACTO, TextoELIMINARTODASLASFORMULASDELIMPACTO, TextoRECUPERARFORMULASORIGINALES];
}
var g = e.detailsElement.find("#detailDimensionesCOFs").ejGrid({
dataSource: data,
locale: GetLocale(),
allowSelection: true,
columns: Columnas,
editSettings: { allowAdding: false, allowEditing: false },
contextMenuSettings: { enableContextMenu: true, contextMenuItems: [], customContextMenuItems: CM },
contextClick: 'contextClick_detailDimensionesCOFs',
queryCellInfo: function (args) { GdcCOFsDimensionesAsignaciones_QueryCellInfo(args); },
toolbarSettings: { showToolbar: false },
allowResizeToFit: true,
idPadre:e.model.clientId
});
}
Thanks!