Vote count: 0
I have created a demo application with kendo read transport with mvc JSON response.Its not binding the data while i am using transport read.so one of the telerik forum have found the json format is not correct manner ,get this error.so In my demo,get the json formatted output.
Here is the link :http://ift.tt/2laPVm2
public JsonResult KendogridIndex3()
{
using (var s = new KendoEntities())
{
var x = s.Students.ToArray().Take(3000);
if (x != null)
{
var jsonResult = Json(x, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
else
{
return null;
}
};
}
output Json Format is here:
[{"StudentID":1,"Name":"sahir","Email":"mailtosahirm@gmail.com","Class":"A","EnrollYear":"1991","City":"chennai","Country":"india"},{"StudentID":2,"Name":"sahir","Email":"free2fly.sahir@gmail.com","Class":"A","EnrollYear":"1991","City":"Nagercoil","Country":"India"}]
Ui:
@{
ViewBag.Title = "kendoGridServerSide";
}
kendoGridServerSide
@section scripts{ }
asked 14 secs ago
Uncaught TypeError: Cannot read property 'slice' of undefined in kendo ui grid for transport read operation
Aucun commentaire:
Enregistrer un commentaire