This is a migrated thread and some comments may be shown as answers.

Telerik grid does not work with jQuery 1.6

7 Answers 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 15 Jun 2011, 10:07 PM

I am developing pages using ASP.NET MVC 3 using VS 2010, SQL 2008.
I am using Telerik Web MVC version 2011.1.315 which is using jQuery 1.5.1
I need to use jQuery 1.6 for my other pages.
My Scripts folder contains a folder for Telerik scripts (2011.1.315) and other scripts which includes the later version jQuery 1.6.1
In the layout, I have 

 

<!DOCTYPE html>
<html>
<head>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/ui-lightness/jquery-ui-1.8.11.custom.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery.multiselect.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/jwysiwyg/jquery.wysiwyg.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.6.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jQuery-ui.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    @RenderSection("JavaScript", false)
    @Html.Telerik().StyleSheetRegistrar().DefaultGroup(g => g.Add("telerik.common.css").Add("telerik.windows7.css"))
</head>
  
<body>
     yada yada yada...
    @Html.Telerik().ScriptRegistrar().jQuery(false); -- This is the last line
</body>
</html>

 

 

 

 

I am trying to implement the inline editing of the Telerik grid. If the user click Edit then Cancel, it works. If the user click Edit and Update, it works. After this edit, if the user clicks Edit second time and then hit Cancel, I got "Error on page".
This is what I found when debug:

Error: "Microsoft JScript runtime error: Object required" at

 

function anonymous(data) { 
var p=[];with(data){p.push('<a href="/Organization/Business/Edit?BusinessId=',BusinessId,'">',ExternalId,'</a>');}return p.join(''); 
}

 

 

 

 

 

Call Stacks:
telerik.grid.editing.min.js
jquery-1.6.1.js
telerik.grid.editing.min.js
telerik.common.min.js
jquery-1.6.1.js

Why Telerik grid calls jQuery 1.6?
If I remove the reference

<script src="@Url.Content("~/Scripts/jquery-1.6.1.js")" type="text/javascript"></script >

from the top, then the Editing/Cancel works. However this will break my other pages.

How should I fix this issue? Please help.

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Jun 2011, 07:53 AM
Hi Alex,

 This is not a known issue and I couldn't reproduce it locally. It may happen if two different versions of jQuery are included in the same page however you are preventing the ScriptRegistrar from including jQuery 1.5.1. Is there a chance to send us a sample project which we can check?

All the best,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alex
Top achievements
Rank 1
answered on 16 Jun 2011, 04:52 PM
That is right. Since I have the @Html.Telerik().ScriptRegistrar().jQuery(false); the 1.5 jQuery version (which is needed for the Telerik grid) is not loaded and the newer version 1.6.1 is loaded (since I included it). And that is why the Cancel functionality breaks.

When will Telerik MVC Grid support jQuery 1.6.1?
0
Atanas Korchev
Telerik team
answered on 16 Jun 2011, 04:54 PM
Hi Alex,

 As I said before I cannot reproduce the problem you are having even with jQuery 1.6.1. We cannot help  unless we somehow reproduce the JavaScript error locally. Providing a sample project or a live url would help us provide a resolution.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Forest
Top achievements
Rank 1
answered on 23 Jun 2011, 02:52 PM
Alex - I'm using the same setup - jquery(false) with jquery 1.6.1 and I'm having no issues with the grid whatsoever.

What exactly are you seeing on the rendered HTML?

The client template will NOT work if you include both 1.5.1 and 1.6.1, so view your rendered html and make sure it's not included twice.

Otherwise, post the code or send a sample project instead of making the assumption that the grid does not support jquery 1.6.1.


0
Alex
Top achievements
Rank 1
answered on 23 Jun 2011, 08:46 PM
Sorry for the delay. I just wrote a sample codes for inline edtting. Steps to reproduce:
1. run the product /Business/List
2. Hit Edit then Update. You can edit.
3. Hit Edit again. This time do not hit Update. Hit Cancel. You will see the exception as I mentioned before.
Thank you for your help.
0
Atanas Korchev
Telerik team
answered on 24 Jun 2011, 08:20 AM
Hello Alex,

 We have addressed this problem in 2011.1 414 which is however available only to licensed customers. We will update the open source license next month.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alex
Top achievements
Rank 1
answered on 27 Jun 2011, 09:35 PM
Thank you for quick reply.

Alex
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Alex
Top achievements
Rank 1
Forest
Top achievements
Rank 1
Share this question
or