ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Error with grids - Cannot read property Header of undefined
Title:
B
I
{code}
?
Hi, It's the 3rd time I purchase this product in the last many years and I could never get grids to work. This time, I REALLY need them. I've copied many many things from the demo. I put a simple grid, but got an Undefined error See image here: https://i.imgur.com/tgY2Sa3.png Here's my view for the grid: @(Html.Awe().Grid("LateFollowUpsCrud") //.Mod(o => o.ColumnsSelector().ColumnsAutohide().PageInfo()) .Url(Url.Action("GridGetItems", "LateFollowUpsCrudGrid")) //.Parent("txtSearch", "search") //.Attr("data-syncg", "dinner") .Height(350) .Columns( new Column { Header = "joe" })) I thought it could be a reference, but when I run the project and check the source of the page, I have this: <link href="/Content/site.css" rel="stylesheet"/> <link href="/Content/hit.css" rel="stylesheet"/> <link href="/Content/themes/gui3/AwesomeMvc.css" rel="stylesheet"/> <script src="/Scripts/modernizr-2.8.3.js"></script> <script src="/Scripts/jquery-1.10.2.js"></script> <script src="/Scripts/jquery-3.4.1.js"></script> <script src="/Scripts/jquery-ui-1.12.1.js"></script> <script src="/Scripts/datepicker-fr.js"></script> <script src="/Scripts/jquery.datetimepicker.js"></script> <script src="/Scripts/jquery.unobtrusive-ajax.js"></script> <script src="/Scripts/jquery.validate.js"></script> <script src="/Scripts/jquery.validate.unobtrusive.js"></script> <script src="/Scripts/AwesomeMvc.js" type="text/javascript"></script> <script src="/Scripts/Awem.js" type="text/javascript"></script> <script src="/Scripts/awem.extras.js" type="text/javascript"></script> <script src="/Scripts/Site.js" type="text/javascript"></script> <script src="/Scripts/signalrSync.js" type="text/javascript"></script> Please help me, I can't figure it out!
Save Changes
Cancel
pacificdave1
asked at 07 Jun 2019
Answers
B
I
{code}
?
maybe you've mixed js files from different versions; why are you including jquery.js 2 times ( 1.10.2 and 3.4.1 ) ? awesome has a datepicker why do you need both jquery-ui and jquery.datetimepicker.js (separate, j-ui already contains it)? maybe try removing everything jquery and AwesomeMvc related from your project (files also) and go through the installation steps again: https://www.aspnetawesome.com/learn/mvc/Installation also your Grid Column needs `Bind` or `ClientFormat` to be defined at least, I strongly recommend you to watch (and execute as you watch) these tutorials: https://www.aspnetawesome.com/learn/mvc/VideoTutorials especially Installation and Grid
Save Changes
Cancel
Omu
answered at 07 Jun 2019
Thank you for your advice! After extensive review and clean up of the js, I got things to work!
at 07 Jun 2019
pacificdave1
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK