|
Index.cshtml
<script>
function detailtemplateClientesDataBound(e) {
var CatalogoContactosClientesGrid = new ej.grids.Grid({
dataSource: dataContactos,
foreignKeyField: ["ClienteID"],
toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel'],
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },
actionBegin: "onActionBeginCatalogoContactosClientesGrid",
detailTemplate: "#detailtemplateContactoClientes",
detailDataBound: ContactosDetailDataBound, //removed the string
load: function (args) {
this.query = new ej.data.Query().where("ClienteID", 'equal', e.data.ClienteID)
},
columns: [
{ field: 'ContactoClienteID', visible: false, isPrimaryKey: true, isIdentity: true },
{ field: 'ClienteID', visible: false, defaultValue: e.data.ClienteID },
{ field: 'Nombre', headerText: 'Nombre' },
{ field: 'ApellidoPaterno', headerText: 'Apellido Paterno' },
{ field: 'ApellidoMaterno', headerText: 'Apellido Materno' }
]
});
CatalogoContactosClientesGrid.appendTo(e.detailElement.querySelector('.contactosCliente'));
detailTab = new ej.navigations.Tab();
detailTab.appendTo(e.detailElement.querySelector('.detailTemplateCliente'));
}
function ContactosDetailDataBound(obj) {
. . . . . . . //Now this function gets triggered
. . . . . . .
} |