I can't get it running. What i'am missing.
Create from VS2013 Template MVC Project.
Including the Infragistics folder (css and js)
Adding in the _Layout in the head section ...
<head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - xx-xx</title> @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") <script src="~/Scripts/jquery-1.10.2.min.js"></script> <script src="~/Scripts/jquery-ui-1.10.4.min.js"></script> <!-- This script reference is require by the Infragistics Loader rendered below --> <script src="@Url.Content("~/Infragistics/js/infragistics.loader.js")"></script></head>
and in the <body> ...
@(Html.Infragistics().Loader() .ScriptPath(Url.Content("~/Infragistics/js/")) .CssPath(Url.Content("~/Infragistics/css/")) .Render() )
After that in the (new Index - View) ...
@using Infragistics.Web.Mvc@model TheShopWeb.Areas.Analysis.Models.ClosedOrdersModel@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml";}<head> <title></title></head>><body> <h2>Index</h2> @(Html.Infragistics().Grid(Model.ListOfOrdersClosed.AsQueryable()) .Width("400px") .DataBind() .Render() ) </body>
Look at your Content/css bundle and add the infragistics css for theme and structure.
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.min.css",
"~/Content/site.css",
"~/Infragistics/css/themes/infragistics/infragistics.theme.css",
"~/Infragistics/css/structure/infragistics.css"));
No it didn't work. Is there a chance to get a sample- somewhat just a application "out of the box MS-Template with a ig-grid? For dummies ...
... and if i do it with "Standard-MS" it works.
@using Infragistics.Web.Mvc@model TheShopWeb.Models.ClosedOrdersModel@{ ViewBag.Title = "ClosedOrders"; Layout = "~/Views/Shared/_Layout.cshtml";}<h2> ClosedOrders</h2>@{ var grid = new WebGrid(@Model.ListOfOrdersClosed, rowsPerPage: 20, columnNames: new[] { "customers_name", "payment_method" }, canPage: true);}@grid.GetHtml( fillEmptyRows: false, mode: WebGridPagerModes.All, columns: grid.Columns( grid.Column("customers_name", header: "customers_name"), grid.Column("payment_method", header: "payment_method") ))"
I can send you a sample if need be, since I am working on a project that is just as you describe. Before doing so, let's compare the bundleConfig since it is working for me.
My Bundle is setup like this -
public static void RegisterBundles(BundleCollection bundles)
{
"~/Content/style.min.css",
"~/Infragistics/css/themes/metro/infragistics.theme.css",
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.10.2.min.js", //{version}.js",
"~/Scripts/jquery-ui-1.10.4.min.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new ScriptBundle("~/bundles/infragistics_JS").Include(
"~/Infragistics/js/infragistics.loader.js"));
}
Then in _Layout I had to move the script references from the MVC template before the body content or it would fail.
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Chris Myrick">
<title>@ViewBag.Title - Live View</title>
<!-- reference CSS files -->
@Styles.Render("~/Content/css")
<!-- reference js files -->
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/infragistics_JS")
@RenderSection("scripts", required: false)
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
Then in the index.cshtml _
@using Infragistics.Web.Mvc
@model LiveView.Core.ViewModels.TicketReportViewModel
@{
ViewBag.Title = "IMS Policy";
<!--The loader dynamically determines which required scripts and CSS must be referenced based off of the Infragistics components used in this View. -->
@(Html.Infragistics().Loader()
.ScriptPath(Url.Content("~/Infragistics/js/"))
.CssPath(Url.Content("~/Infragistics/css/"))
.Render()
)
<!-- The helpers require that Render() be the last method called. -->
@(Html.Infragistics().Grid(Model.WorkItems.AsQueryable())
....
Thanks. I had same problem. This fixed it.
Yes, you're right, it seems i fall in every newbies-hole - grrrrrrr ...
Hi,
You may encounter this issue if you don't clear IE11 cache. Please use the Internet Options window to delete all cache files and try running the sample again.
It didn't run. It throws:
JavaScript critical error at line 1, column 1 in http://cdn-na.infragistics.com/jquery/20132/latest/js/infragistics.core.js\n\nSCRIPT1014: Invalid Character
I will be happy to assist you.
Attached you will find a sample that demonstrates how you enable Remote Sorting for the igGrid. Please run the sample, compare it with your project, and let me know if you have any questions.
I am looking forward to hearing from you.