This is a migrated thread and some comments may be shown as answers.
JQuery 1.8.2 failure when grid renders empty
3 Answers 47 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tor
Top achievements
Rank 1
Tor asked on 11 Feb 2013, 09:50 PM
I recently upgraded my JQuery version to 1.8.2 and noticed that my MVC Extensions grid started to give me JavaScript errors when it renders empty (bound to empty data source):

I have attached a sample project that can be used to reproduce the error. I have reproduced it using IE 8.0/9.0.

I am not seeing the same error if I run JQuery 1.7.1. Is the MVC Extensions grid supposed to be compatible with JQuery 1.8.2?

Specifically the error seems to involve an extension of JQuery's data filter method:

The following line inside telerik.grid.min.js causes a syntax error.
dataFilter:function(v,w){v=eval("("+v.replace(j,"new Date($1)")+")"); 

In my solution I have a mix of Kendo and MVC extension grids on the same page, so I need to upgrade JQuery since Kendo requires the newer version.
The Telerik forum states that MVC extensions can coexist with Kendo, but there seems to be an issue with the JQuery dependency.

Thanks
Tor

3 Answers, 1 is accepted

Sort by
0
Moises
Top achievements
Rank 1
answered on 13 Feb 2013, 08:31 PM
I am experiencing similar behavior when I attempt to use JQuery 1.9.1 using the Google CDN.
I was able to use Firebug to tell me what scrips was Telerik trying to use and saw the following:
if(!jQuery.telerik){
jQuery.ajax({
url:"/Scripts/2012.1.214/telerik.common.min.js",
dataType:"script",
cache:false,
success:function(){
jQuery.telerik.load(["/Scripts/2012.1.214/jquery-1.7.1.min.js","/
etc...

Obviously Telerik is trying to load version 1.7.1 but is there anyway to override this behavior?
I used this ScriptRegister command to disable the default behavior but it doesn't work:

@Html.Telerik().ScriptRegistrar().jQuery(

 

false).jQueryValidation(false);



I am using Telerik Version 2012.1.214.340

Thanks,

0
Lynette Anderson
Top achievements
Rank 1
answered on 20 Mar 2013, 09:53 PM
We've noted that Kendo doesn't always play nice with the Telerik MVC extensions and is the reason why we decided not to use Kendo at this time. As the product becomes more mature we're certain most of these issues will be resolved.

As far as the JQuery compatibility problem is concerned, it is a bit annoying that there isn't a comprehensive up to date online source that clearly annunciates which JQuery version should be utilized with versions of Kendo, MVC, and the Rad Controls.

It is particularly aggravating to us because we strive to keep up with the latest versions of all the Telerik tools we utilize in our products and there is often conflict between them and the JQuery libraries upon which we also rely.
0
Alan Wong
Top achievements
Rank 1
answered on 25 Apr 2013, 06:12 PM
You need to use the jquery-migrate-1.1.1 shim available with jQuery:

http://jquery.com/download/
Tags
Grid
Asked by
Tor
Top achievements
Rank 1
Answers by
Moises
Top achievements
Rank 1
Lynette Anderson
Top achievements
Rank 1
Alan Wong
Top achievements
Rank 1
Share this question
or