1385
Can't get grid working at all
posted

I have reduced my sample as far as I can.. I get a jacascript error in the console when I run it, and the grid appears with column headings but no data:

Exception was thrown at line 1864, column 2 in http://localhost:56929/Scripts/jquery-1.10.2.js

0x800a139e - JavaScript runtime error: Syntax error, unrecognized expression: unsupported pseudo: jqmData

@{

ViewBag.Title = "CSM Tax Report";

}

@using Infragistics.Web.Mvc

@using TrackerMvc.Models.ClientTrackerDataModel.Reports

@model IQueryable<FormsByClient>

<div>

<link href="@Url.Content("~/Content/themes/infragistics/infragistics.theme.css")" rel="stylesheet" />

<link href="@Url.Content("~/Content/structure/infragistics.css")" rel="stylesheet" />

@section scripts {

<script src="@Url.Content("~/igniteui/js/infragistics.core.js")">script>

<script src="@Url.Content("~/igniteui/js/infragistics.lob.js")">script>

<script src="~/igniteui/js/infragistics.loader.js" type="text/javascript">script>

<script type="text/javascript">

$.ig.loader({

scriptPath: '@Url.Content("~/igniteui/js/")',

cssPath: '@Url.Content("~/igniteui/css/")',

resources: "igGrid.Sorting"

});

script>

@(Html.Infragistics()

.Grid<FormsByClient>(Model)

.ID("Grid")

.Height("500px")

.Width("100%")

.AutoGenerateColumns(false)

.AutoGenerateLayouts(true)

.RenderCheckboxes(true)

.ResponseDataKey(null)

.Columns(column =>

{

column.For(x => x.FileCompID).HeaderText("File Comp ID").Width("35%");

column.For(x => x.FiledMethodId).HeaderText("Filed Method ID").Width("65%");

})

.DataSourceUrl(Url.Content("~/ct/FormsByClientJson/1/2015/C"))

.Render()

)

}

div>

private GridModel GridLoadOnDemandModel()

{

// Define the Categories layout

GridModel grid = new GridModel();

grid.AutoGenerateLayouts = true;

grid.AutoGenerateColumns = false;

grid.Width = "100%";

grid.PrimaryKey = "FileCompID";

grid.Columns.Add(new GridColumn() { HeaderText = "FileCompID", Key = "FileCompID", DataType = "number", Width = "15%" });

grid.Columns.Add(new GridColumn() { HeaderText = "FiledMethodId", Key = "FiledMethodId", DataType = "number", Width = "85%" });

return grid;

}

[Route("FormsByClientJson/{id:int}/{fileyear:int}/{filetype:alpha}")]

public JsonResult FormsByClientJson(int id, int fileyear, string filetype)

{

GridModel model = GridLoadOnDemandModel();

model.DataSource= new List<FormsByClient>()

{

new FormsByClient() { FileCompID = 1, FiledMethodId = 10 },

new FormsByClient() { FileCompID = 2, FiledMethodId = 20 }

}.AsQueryable();

return model.GetData();

}

namespace TrackerMvc.Models.ClientTrackerDataModel.Reports

{

public class FormsByClient

{

public int FileCompID { get; set; }

public int FiledMethodId { get; set; }

}

}

JSON Returned by Datasourceurl =

{"Records":[{"FileCompID":1,"FiledMethodId":10},{"FileCompID":2,"FiledMethodId":20}],"TotalRecordsCount":0,"Metadata":{"timezoneOffset":-21600000}}

Parents
No Data
Reply
  • 30
    posted

    Hello! I’m a Ann, I would like to challenge the whole world with the kind of app  follows:

    First,  hotmail email login is an free e-mail service provided to Internet users by the giant Microsoft. If you are a new user of this service and don’t exactly know how the Hotmail sign in process works, you can follow the steps below to log in to Hotmail account.

    Second, hotmail account login is one of the popular email service and the most commonly used today. Now, let’s guide you through on how to Sign in to Hotmail, follow the steps below to log in to your Hotmail account.

    And  gmail sign up Gmail is Google’s free email service that enables users to send and receive e-mail over the Internet. If you already have a Gmail account, please login to gmail to use, or gmail sign up if you haven’t.

Children
No Data