2

I have been using AweomeGrid for about 2 mvc4 Projects Now and It has been working fine, However I am completely bumped when I tried the mvc5 Branch. I basically have a grid and controller setup as follows

 @Html.Awe().Grid("grdZone")
    .Groupable(false)
    .Url(Url.Action("ZoneRead", "Setup"))
    .PageSize(20)
    .Columns(
    new Column(){ Name = "Id", Width = 70 },
    new Column(){ Name = "Name" },
    new Column(){ Name = "GCount", Header = "Group Count", Width = 100})

And the controller listing is as follows

 public ActionResult ZoneRead(GridParams g)
        {
            var model = _zoneService.GetAll().Select(i => new ZoneListModel
            {
                Id = i.Id,
                GCount = i.Groups.Count(),
                Name = i.Name
            });
            return Json(new GridModelBuilder<ZoneListModel>(model, g)
            {
                Key = "Id",
                Map = o => new
                {
                    o.Id,
                    o.Name,
                    o.GCount
                }
            }.Build());
        }

The problem is that The controller actually returns the data but somehow strangely, The Grid just displays empty table cells without any values at all. The number of empty rows displayed however corresponda to the records returned by the controller method

Please what Am I doing wrong

A speedy answer will be appreaciated

Omu
  • 69,856
  • 92
  • 277
  • 407
Paul Plato
  • 1,471
  • 6
  • 28
  • 36

1 Answers1

1

it's possible that on mvc5 you're using minification, and the minification broke the script, try adding AwesomeMvc.js without including it in a script bundle

(btw using version 4.7 this shouldn't happen anymore)

Omu
  • 69,856
  • 92
  • 277
  • 407