I'm using asp.net mvc4 with kendo ui. I have a simple grid that gets loaded with no values on load (Index()) and then once a search button is clicked data populates the grid(Index(int value)). Here's what I've found so far. I think the problem is how I have my .js files arranged but I'm not positive. I already built one app and it works correctly and I had a problem with how to arrange the .js files. The other issue seems to be with Areas in the MVC application. I have to add a _ViewStart under all my ares under the Views folder or there is no formatting. In my _viewstart file I have @{ Layout = "~/Views/Shared/_Layout.cshtml";}. If I comment that out the page loads correctly but there is no data. If I include it to layout my page it calls the correct method and returns data but it also calls the Index() method and load a blank Model and clears out my results.
Here's my _Layout:
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/kendo")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/kendo")
@Scripts.Render("/bundles/jqueryval")
Bundles
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.8.2.js"));
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
"~/Scripts/kendo/2012.3.1114/kendo.all.*"
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/modernizr-2.5.3.js",
"~/Scripts/jquery.validate.min.js",
"~/Scripts/jquery.unobtrusive*"));
Thanks
Dennis
Here's my _Layout:
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/kendo")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/kendo")
@Scripts.Render("/bundles/jqueryval")
Bundles
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.8.2.js"));
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
"~/Scripts/kendo/2012.3.1114/kendo.all.*"
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/modernizr-2.5.3.js",
"~/Scripts/jquery.validate.min.js",
"~/Scripts/jquery.unobtrusive*"));
Thanks
Dennis