views:

298

answers:

2

I am trying to use Telerik MVC extension with jQGrid in a ASP.NET MVC application. But I found they cannot nicely play each other, meaning I cannot have them working together in one View. No sure why? I guess it is because the place for js files. JqGrid needs to put the js library in Head, but Telerik requires before end of Body tag, based on its instruction. I tried to move this piece of code see below above. Telerik MVC extension does not work any more. Does anybody get them work smoothly? Actually, I can use JQuery UI, which Telerik's built up on. But Telerik's fluent API looks better.

   <%
        Html.Telerik().ScriptRegistrar()
                      .Render();
    %>

Update:

Now, I should be able to get them work together.

First, in Site.Master, add another content after Telerik script render like:

<%
     Html.Telerik().ScriptRegistrar()
              .Render();
%>

<asp:ContentPlaceHolder ID="ScriptContent" runat="server" />

Then, in the View, add the script specific for view in ScriptContent. Then everything works.

+1  A: 

You could try this:

http://jmvcui.codeplex.com/

They are also MVC helper methods for jQuery UI. Perhaps there won't be a conflict.

Slack
Thank you, Bob!
Liang Wu
+1  A: 

You can now disable the automatic jQuery including:

<%= Html.Telerik().ScriptRegistrar().jQuery(false) %>
korchev