Hi, I made the sub grid detailInit method but I need an ajax request to the server rather then simple method call
The detailInit method:
detailInit(e) {
$(
"<div/>"
).appendTo(e.detailCell).kendoGrid({
dataSource: {
transport: {
read:
function
(readOptions) {
debugger;
var
parameters = {
Filter: {
FileId: e.data.Id
},
Skip: readOptions.data.skip ? readOptions.data.skip : 0,
Take: readOptions.data.take ? readOptions.data.take : Page_Size
};
return
$.ajax({
type:
"POST"
,
url:
"/ImportingStatusReport/GetImportStatusEntityData"
,
contentType:
"application/json; charset=utf-8"
,
data: (kendo.stringify({ filter: parameters })),
cache:
false
,
success:
function
(returnData) {
debugger;
readOptions.success(returnData);
}
});
},
},
schema: {
data:
"Data"
,
total:
"Total"
,
},
serverGrouping:
true
,
serverPaging:
true
,
serverSorting:
true
,
pageSize: 10,
filter: { field:
"FileId"
, operator:
"eq"
, value: e.data.Id }
},
scrollable:
false
,
sortable:
true
,
pageable:
true
,
columns: [
{ field:
"RecordType"
, title:
"Record Type"
, width:
"110px"
},
{ field:
"ImportStatus"
, title:
"Import Status"
, width:
"110px"
},
{ field:
"ImportErrors"
, title:
"Import Errors"
, width:
"110px"
},
]
});
}
I get data from the backend to the success method but the data isn't displayed on the UI. The sub table is empty. What can be causing this and where to look for the error?