Kendo grid error : kendo.all.min.js:12 Uncaught TypeError: e.slice is not a function

Getting Uncaught TypeError: e.slice is not a function error message while binding kendo grid with data using controller action method

Following is the sample code for View and Controller action

View :

$(function () {
height: 400,
dataSource: {
serverPaging: true,
serverFiltering: true,
serverSorting: true,
pageSize: 10,
transport: {
read: “Employee/Read”,
contentType: “application/json”,
type: “POST”
schema: {
data: “Data”,
total: “Total”,

columns: [
{ field: “Salary”, format: “{0:c}”, width: “150px” },
{ field: “EmployeeName”, width: “150px” },
{ field: “SalaryColor”, width: “100px” },
{ command: “destroy”, title: “Delete”, width: “110px” }

editable: true, // enable editing
pageable: true,
sortable: true,
filterable: true,
toolbar: [“create”, “save”, “cancel”], // specify toolbar commands
parameterMap: function (options) {
return kendo.stringify(options);

Controller Read Action :

public ActionResult Read(int take, int skip, IEnumerable<Sort> sort, Kendo.DynamicLinq.Filter filter)
SalesERPDAL salesDal = new SalesERPDAL();

var result = salesDal.Employees.OrderBy(p => p.FirstName)
.Select(p => new EmployeeViewModel
EmployeeName = p.FirstName,
Salary = “5000”,
SalaryColor = “yellow”
}).ToDataSourceResult(take, skip, sort, filter);

return Json(result,JsonRequestBehavior.AllowGet);

Problem is in above code we are passing whole result instead of only Data part of result should be passed.

return Json(result.Data,JsonRequestBehavior.AllowGet);

Hope this help !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s