I'm trying to use a simple master detail grid hierarchy
but does not load the json service detail information
this is my code, which is my error?
Please help
<script>
$(document).ready(function() {
$("#gridEventosEventos").kendoGrid({
editable:true,
height: 474,
columns: [
{ field: "idEvento", title:"id evento", width: "150px"},
{ field: "nomCliente", title:"Nombre Cliente", width: "150px"},
{ field: "idCliente", title:"Telefono Cliente", width: "120px" },
{ field: "nomEvento", title: "Celular Cliente", width: "120px" },
{ field: "idProyecto", title: "Email CLiente", width: "120px" },
{ field: "nomProyecto", title:"Codigo Ejecutivo Cuenta", width: "150px"},
{ field: "idUnidadDeNegocio", title:"Nombre Ejecutivo Cuenta", width: "150px" },
{ field: "nomUnidadDeNegocio", title:"Codigo Director Cuenta", width: "150px" },
{ field: "idCreadoPor", title:"Nombre Director Cuenta", width: "150px"},
{ field: "nomCreador", title:"Estado Cliente", width: "120px"},
{ field: "categoria", title: "Nombre estado", width: "120px"},
{ field: "nomCategoria", title:"Nombre Director Cuenta", width: "150px"},
{ field: "estadoEvento", title:"Estado Cliente", width: "120px"},
{ field: "nomEstadoEvento", title: "Nombre estado", width: "120px"}
],
dataSource: {
transport: {
read: { url :"/SiradSeguridadWS/sirad/api/SiradServletsEventos?consultarEventos",
dataType: "json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
pageSize: 6,
serverPaging: true,
serverSorting: true,
schema: {
model: {
id: "idEvento",
fields: {
idEvento: {editable: true, nullable: true},
nomCliente: {editable: true, nullable: true },
idCliente: {editable: true, nullable: true },
nomEvento: {editable: true, nullable: true },
idProyecto: { editable: true, nullable: true },
nomProyecto: { editable: true, nullable: true},
idUnidadDeNegocio: {editable: true, nullable: true },
nomUnidadDeNegocio: {editable: true, nullable: true },
idCreadoPor: {editable: true, nullable: true },
nomCreador: { editable: true, nullable: true },
categoria: { editable: true, nullable: true},
nomCategoria: {editable: true, nullable: true },
estadoEvento: {editable: true, nullable: true },
nomEstadoEvento: {editable: true, nullable: true }
}
}
}
},
detailInit: detailIniteventos,
dataBound: function() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
}
});
});
function detailIniteventos(e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: {
transport: {
read: "/SiradSeguridadWS/sirad/api/SiradServletsEventos?consultarVersionEventos",
dataType: "json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
},
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 5,
schema: {
model: {
id: "idVersionEvento",
fields: {
idEvento: {editable: true, nullable: true},
idVersionEvento: {editable: true, nullable: true },
nomVersionEvento: {editable: true, nullable: true },
idCreadoPor: {editable: true, nullable: true },
nomCreadoPor: { editable: true, nullable: true },
idDirigidoA: { editable: true, nullable: true},
nomDirigidoA: {editable: true, nullable: true },
comentario: {editable: true, nullable: true },
requiereSeguimiento: {editable: true, nullable: true },
fechaDeSeguimiento: { editable: true, nullable: true }
}
},
},
filter: { field: "idCliente", operator: "eq", value: e.data.idCliente }
},
scrollable: false,
sortable: true,
pageable: true,
columns: [
{ field: "idVersionEvento", width: "70px" },
{ field: "nomVersionEvento", title:"Ship Country", width: "110px" },
{ field: "nomCreadoPor", title:"Ship Address" },
{ field: "nomDirigidoA", title: "Ship Name", width: "200px" }
]
});
}
</script>
but does not load the json service detail information
this is my code, which is my error?
Please help
<script>
$(document).ready(function() {
$("#gridEventosEventos").kendoGrid({
editable:true,
height: 474,
columns: [
{ field: "idEvento", title:"id evento", width: "150px"},
{ field: "nomCliente", title:"Nombre Cliente", width: "150px"},
{ field: "idCliente", title:"Telefono Cliente", width: "120px" },
{ field: "nomEvento", title: "Celular Cliente", width: "120px" },
{ field: "idProyecto", title: "Email CLiente", width: "120px" },
{ field: "nomProyecto", title:"Codigo Ejecutivo Cuenta", width: "150px"},
{ field: "idUnidadDeNegocio", title:"Nombre Ejecutivo Cuenta", width: "150px" },
{ field: "nomUnidadDeNegocio", title:"Codigo Director Cuenta", width: "150px" },
{ field: "idCreadoPor", title:"Nombre Director Cuenta", width: "150px"},
{ field: "nomCreador", title:"Estado Cliente", width: "120px"},
{ field: "categoria", title: "Nombre estado", width: "120px"},
{ field: "nomCategoria", title:"Nombre Director Cuenta", width: "150px"},
{ field: "estadoEvento", title:"Estado Cliente", width: "120px"},
{ field: "nomEstadoEvento", title: "Nombre estado", width: "120px"}
],
dataSource: {
transport: {
read: { url :"/SiradSeguridadWS/sirad/api/SiradServletsEventos?consultarEventos",
dataType: "json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
pageSize: 6,
serverPaging: true,
serverSorting: true,
schema: {
model: {
id: "idEvento",
fields: {
idEvento: {editable: true, nullable: true},
nomCliente: {editable: true, nullable: true },
idCliente: {editable: true, nullable: true },
nomEvento: {editable: true, nullable: true },
idProyecto: { editable: true, nullable: true },
nomProyecto: { editable: true, nullable: true},
idUnidadDeNegocio: {editable: true, nullable: true },
nomUnidadDeNegocio: {editable: true, nullable: true },
idCreadoPor: {editable: true, nullable: true },
nomCreador: { editable: true, nullable: true },
categoria: { editable: true, nullable: true},
nomCategoria: {editable: true, nullable: true },
estadoEvento: {editable: true, nullable: true },
nomEstadoEvento: {editable: true, nullable: true }
}
}
}
},
detailInit: detailIniteventos,
dataBound: function() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
}
});
});
function detailIniteventos(e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: {
transport: {
read: "/SiradSeguridadWS/sirad/api/SiradServletsEventos?consultarVersionEventos",
dataType: "json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
},
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 5,
schema: {
model: {
id: "idVersionEvento",
fields: {
idEvento: {editable: true, nullable: true},
idVersionEvento: {editable: true, nullable: true },
nomVersionEvento: {editable: true, nullable: true },
idCreadoPor: {editable: true, nullable: true },
nomCreadoPor: { editable: true, nullable: true },
idDirigidoA: { editable: true, nullable: true},
nomDirigidoA: {editable: true, nullable: true },
comentario: {editable: true, nullable: true },
requiereSeguimiento: {editable: true, nullable: true },
fechaDeSeguimiento: { editable: true, nullable: true }
}
},
},
filter: { field: "idCliente", operator: "eq", value: e.data.idCliente }
},
scrollable: false,
sortable: true,
pageable: true,
columns: [
{ field: "idVersionEvento", width: "70px" },
{ field: "nomVersionEvento", title:"Ship Country", width: "110px" },
{ field: "nomCreadoPor", title:"Ship Address" },
{ field: "nomDirigidoA", title: "Ship Name", width: "200px" }
]
});
}
</script>