Hello,
I'm having problems getting the details template template to populate from the same kendo data source as the grid. I'm loading the data source for the grid like this:
gridDatasource = new kendo.data.DataSource{
transport:
{
read: function(options)
{
$.ajax({
url: "../services/foo.asmx/GetData",
datatype: "json",
success: function(result){ options.success(result) }
});
}
}
}
The grid populates fine but the detail template will not load. This is how I'm trying to call the detailInit(e)
function detailInit(e) {
getRenewalOpsDetails(e.data);
var detailRow = e.detailRow;
detailRow.find(".tabstrip").kendoTabStrip
({
animation: { open: { effects: "fadeIn" } }
});
detailRow.find("#grdAccountDetails").kendoGrid
({
dataSource: kdsRenewalOpsDetails,
scrollable: false,
columns:
[
{ field: "RefNo", title: "Account Ref No" },
{ field: "NamedInsured", title: "Named Insured" },
{ field: "Address", title: "Address" },
{ field: "RenewalOpsComments", title: "Comments" }
]
});
}
function getRenewalOpsDetails(data)
{
kdsRenewalOpsDetails = new kendo.data.DataSource
({
dataSource:
{
data: data,
schema:
{
model:
{
field:
{
Address: { type: "string" },
NamedInsured: { type: "string" },
RefNo: { type: "string" },
RenewalOpsComments: { type: "string", editable: true },
RenewalOpsCommentsTextID: { type: "number" },
StateCode: { type: "string" }
}
}
}
}
});
}
When debugging inside of chrome I can see that there is data inside of e.data, but the details grid will not populate. Any help would be greatly appreciated, thanks!