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
160
GridModel.DataSourceUrl doesn't load using JQuery 1.7.2
posted

I have been using Infragistics.Grid for a while but needed to reference JQuery 1.7.2 within my pages. I updated the script file reference to the later JS file from aspnetcdn.com, and the grid will no longer show data or stop showing the loading animation. 

The problem appears to be DataSourceUrl - DataSource still works OK. I am using version 2012.1 getting IQueryable data from an MVC ActionResult action method with GridDataSourceAction attibute. 

Is there a known issue for this, is there a workaround?

Thanks for any help.

Simon

Here is an example of the code failing:-

@using Infragistics.Web.Mvc;

@model int
@{
    Layout = null;
}
<html>
<head>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
 
    <!-- PROBLEM HERE ============================================
        jquery-1.4.4.min.js works OK
        jquery-1.7.2.min.js fails to load data and loading animation is shown
    -->
    <script src="">ajax.aspnetcdn.com/.../jquery-1.7.2.min.js" type="text/javascript"></script>
 
    <script src="">ajax.googleapis.com/.../jquery-ui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/Ig/infragistics.loader.js")"></script>
 
    @(Html.Infragistics().Loader()
        .ScriptPath(Url.Content("~/Scripts/Ig"))
       .CssPath(Url.Content("~/Content/Ig"))
       .Resources("igShared")
       .Render())
</head>
@{
    // DataSourceUrl Fails with jquery-1.7.2.js -->
    GridModel gridModelUrl = new GridModel();
    gridModelUrl.ID = "grdWheelsUrl";
    gridModelUrl.Columns.Add(new GridColumn("Pos", "Position", "string", "100px"));
    object vehicleIdRouteValues = new { id = Model };
    gridModelUrl.DataSourceUrl = Url.Action("GetVehiclesWheels_Temp", vehicleIdRouteValues);
 
    // DataSource OK for either jquery-1.x.x.js file
    GridModel gridModel = new GridModel();
    gridModel.ID = "grdWheels";
    gridModel.Columns.Add(new GridColumn("Pos", "Position", "string", "100px"));
    List<object> hardcoded = new List<object>();
    hardcoded.Add(new { Wheel = 7, Position = "Middle" });
    gridModel.DataSource = hardcoded.AsQueryable();
}
 
<h1>Data source URL</h1>
@Html.Infragistics().Grid(gridModelUrl)
<h1>Hardcoded Data source</h1>
@Html.Infragistics().Grid(gridModel)
</html>
 
Parents
  • 23953
    Verified Answer
    Offline posted

    Hi Simon,

    I was able to reproduce your problem only with NA for jQuery 12.1.2023 and the error was:

    Uncaught Error: The remote request to fetch data has failed: (parsererror) Cannot read property 'paging' of undefined

    This issue seems to be fixed in the following SRs: 12.1.2049 and 12.1.2059. Try to update to one of these SRs and see if it works for you.

     

    Hope this helps,

    Martin Pavlov

    Infragistics, Inc.

Reply Children
No Data