When I try to use the grouping functionality of the grid as soon as I drag a column. The waiting gif shows and hangs. Meanwhile, in the console I see the following error : Uncaught TypeError: Cannot read property 'length' of undefined kendo.all.js.
I have noticed this in other versions of the kendo grid as well. In the past I was able to get it to work in the past by downgrading my jquery to 1.7.1. This is unacceptable since the script is supposed to be compatible with 1.9.1 and downgrading causes compatibility issues with other scripts that I am using from other frameworks. This issue has been left un-addressed for way too long.
Please provide a patch for this bug.
14 Answers, 1 is accepted
Please check the below link to see dependency on Jquery.js
http://docs.kendoui.com/getting-started/javascript-dependencies#jquery-version
Thanks,
Jayesh Goyani
The online demos, including Column Reordering, are using jQuery 1.9.1
They function properly and I doubt that the error you see has anything to do with the jQuery version.
Please, check that you're including the scripts in the correct order and that you're not loading jQuery more than once.
We'll need to take a look at the actual page in order to provide more specific advice.
T. Tsonev
Telerik
Sorry about misreading your question. I tried reproducing the problem, this time with grouping enabled, but again with no success.
This is the complete page I used for testing:
<!DOCTYPE html>
<html>
<head>
<link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js"></script>
</head>
<body>
<div id="grid" />
<script>
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: "http://demos.kendoui.com/service/Products",
dataType: "jsonp"
}
},
pageSize: 5,
group: {
field: "UnitsInStock",
dir: "asc"
}
},
groupable: true,
columns: [
{
field: "ProductName",
title: "Product Name"
},
{
field: "UnitPrice",
title: "Unit Price",
format: "{0:c}"
},
{
field: "UnitsInStock",
title: "Units In Stock"
}
]
});
</script>
</body>
</html>
T. Tsonev
Telerik
Thanks to Jaime for the workaround, but I'm not sure this constitutes a true fix.
Telerik, do you have any thoughts?
We are not able to replicate this behavior. Can you please extract a runnable sample where this issue manifests itself so we can debug it locally?
Regards,
Nikolay Rusev
Telerik
You are missing the [DataSourceRequest] attribute in the `GridRead` action method.
[HttpPost]
public
ActionResult GridRead([DataSourceRequest]DataSourceRequest request)
{
return
Json(CreateData().ToDataSourceResult(request));
}
Regards,
Nikolay Rusev
Telerik
As always, you guys rock.
Thanks again.
Uncaught TypeError: Cannot read property 'length' of undefined
--kendo.web.min.js:10
Adding .ServerOperation(false) to or dataSource description does make the error go away, but this is not an acceptable fix for us because some of our data sets are very large; paging and sorting must be done server-side.
Is there any real fix for this error? is one likely in the future?
We're using kendo 2014.2.716 and Chrome.
We are not sure about the scenario you have. Can you provide us with an example for this behavior?
Regards,
Nikolay Rusev
Telerik
I have same issue in my kendo grid. I have 12000 records. if i am putting .ServerOperation(false) my records are not binding to grid. and if I am putting .ServerOperation(true) my records are coming but filtering , grouping is not working.
Thank You
Gauravi
Hello Gauravi,
The question you've posted is not directly related to the original forum topic. Thus I suggest you to open a new one with your question.
It will be also helpful if you provide us with runnable example where the behavior can be observed. I see that you are using MVC wrappers and in case of that amount of items the request might fail ( you can inspect the Network tab of your browser). Here is possible reason and solution for it - Error during serialization or deserialization using the JSON JavaScriptSerializer
Regards,
Nikolay Rusev
Telerik