Hello,
I had an example MVC3 / EF igGrid project up and working recently with static references to the necessary js libs, and all worked well.
When I decided to change over to the igLoader, however, I can't get the grid to load data- The grid draws the headers, then dies with: "JScript runtime error: 'JSON' is undefined", in infragistics.datasource.js . The only other changes I've made are to update jQuery, jQuery-ui, and modernizr via the package manager in Visual Studio.
The only code changes I made to the example project that was previously working were to include the igLoader and to call it in the _Layout file. I'm going blind trying to figure out what I've done wrong. My declarations are below- can anyone help?
Thanks.
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css"/>
<script src="@Url.Content("~/Scripts/jquery-1.8.0.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.23.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/IG/js/infragistics.loader.js")" type="text/javascript"></script>
@(Html.Infragistics().Loader()
.ScriptPath(Url.Content("~/Scripts/IG/js/"))
.CssPath(Url.Content("~/Content/IG/css/"))
.Render()
)
Hello Charlie,Please use the following sample as a start point of migrating to the ig loader - http://users.infragistics.com/NTsvetkov/Modified_12.1.zip
The sample didn't work.
I found and fixed the problem- First of all, if you don't include json.js in your project, and Compatibility View is turned on in IE9, you will receive the JSON error I mentioned above.
Once I had that resolved, I started receiving previously unseen javascript errors about a value of null in the data.length variable in the infragistics.datasource.js library, as well as other strange errors.
I found that the jQuery product has a problem if you update the jQuery, jQuery-ui, and modernizr libraries. Because I wanted to use up-to-date js libs when starting a new project, I used the Package Manager add-on in Visual Studio 2010 to update these and other libs using the following commands:
As the code shows in my first post, after the update my project ended up with jquery-1.8.0.min.js, jquery-ui-1.8.23.min.js, and modernizr-2.5.3.js . When I reverted to the javascript libraries included by default in a new MVC3 project (jquery-1.5.1.min.js, jquery-ui-1.8.11.min.js, modernizr-1.7.js), everything started working again.
All this having been said, could you show me where a reference is, in the documentation or tutorials, for javascript version compatibility? Also, it would be nice if Taz would update the video tutorials to reflect the newly recommended procedures in 2012.1 for using igLoader.
Regards,
Charlie