Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
680
Object doesn't support property or method 'igGrid' on refresh
posted

I've got an ASP.NET MVC 4 app using igGrid. When the page first comes up, it works fine. If I refresh the page, I get the error:

 

Microsoft JScript runtime error: Object doesn't support property or method 'igGrid'

 

In the F12 developer tools, all the scripts seem to be loaded, so my guess is something's not happening in the proper order.

 

In my _Layout.cshtml, I have:

 

    <script type="text/javascript">     $.ig.loader({         scriptPath: '@Url.Content("~/Scripts/")',         cssPath: '@Url.Content("~/Content/")',         resources: 'igTree,igGrid'     });</script>   

 

In the .cshtml of the page with the problem, I simply have:

 

@using Infragistics.Web.Mvc;  @model GEMS.Web.Models.MedicalProcedurePriceMaintModel @{     ViewBag.Title = "Index"; } <h2>Medical Procedure Price Maintenance</h2>

@(Html.Infragistics().     Grid<GEMS.Web.Business.Contracts.IMedicalItemPrice>().     Columns(column=>         {             column.For(x => x.WarehouseCode).HeaderText("Warehouse").Width("70px");             column.For(x => x.Item).HeaderText("Item").Width("150px");             column.For(x => x.Description).HeaderText("Description").Width("200px");             column.For(x => x.Price).HeaderText("Price").Width("50px").Format("C");         }).     ID("grid").     DataSourceUrl(Url.Action("BindGridFiltering")).     Width("500px").     DataBind().     Render())

 

BTW, it'd be nice if you guys had code tags for your HTML editor so this stuff would actually format (or if you have them, make it more obvious where they are).

Parents Reply Children