Hi,
I found a Video showing how to Setup a MVC Project with 2011.1 Version of the jQuery Controls but this doesn't work for me.
Now I need to know how to setup a MVC 4 Project (VS 2010) with jQuery Controls V. 2012.1.
Can you please provide a step by step resource?!
Thanks for your help.
Regards
Herbert
Hello Herbert,
From 12.2 version we provide Ignite UI Visual Studio project templates for MVC 3/4, but unfortunately they are not available in 12.1.
Also in 12.1 we don't have Infragistics.Web.Mvc.dll pre-compiled for MVC4 as part of the installation. You have to manually compile NetAdvantage for jQuery source for the MVC wrappers against MVC 4 (the source should be available for download from our website for users with licenses).
Apart from that the steps for setting up a MVC 4 project to use the Infragistics jQuery controls are:1. Copy the js/css folders from the NA for jQuery installation folder into your project
2. (Optional)Add reference to Infragistics.Web.Mvc.dll (compiled against MVC 4). It is not a mandatory step, but the wrappers make the server side data binding very easy.
3. Add references to jQuery, jQuery UI libraries and infragistics.loader.js in the Views\Shared\_Layout.cshtml file
4. In the Views\Home\Index.cshtml configure the Infragistics Loader and use our controls.
For more information you may want to read the Adding Controls to an MVC Project and Using Infragistics Loader topics.
Hope this helps,Martin PavlovInfragistics, Inc.
Hi Martin,
thank you for your reply.
I was able to compile the wrappers for MVC against MVC 4 successfully and added the reference to my project accordingly.
After this I added the scripts and layout (CSS) as described to do a test with the Rating Control. But unfortunately there is an error running the project (translated from german):"JavaScript RuntimeError: The Property "isDocumentReady" is not defined or Nullreference cannot be set."
Here is the code for my _Layout.cshtml:
<html lang="en"> <head> <meta charset="utf-8" /> <title>@ViewBag.Title - ITC Webshop App</title> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script> <script src="../../Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script> <script src="../../Scripts/IG/infragistics.js" type="text/javascript"></script> <script src="../../Scripts/IG/infragistics.loader.js" type="text/javascript"></script> <link href="../../Content/IG/themes/infragistics/infragistics.theme.css" rel="stylesheet" type="text/css" /> @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") </head>...
Here is the code for my Index.cshtml:
@using Infragistics.Web.Mvc; @{ ViewBag.Title = "Willkommen bei ITC Webcommerce"; } @section featured { <section class="featured"> <div class="content-wrapper"> . . . </div> </section> } @(Html.Infragistics().Rating() .Precision(RatingPrecision.Exact) .Value(3) .VoteCount(5) .Render() )
Any help to get this running is appreciated!
RegardsHerbert