I'm having trouble getting the in nest editing grid to work. This it what it is suppose to do http://demo.aspnetawesome.com/GridNestingDemo. Open the grid line to you and edit in the grid. When I copy the demo code pretty much line by line my grid opens up in a popup window outside of the grid. I have looked at the demo project over and over and pretty much copied everything exactly.
View:
@Html.InitCrudForGridNest("LeadGrid", "Leads")
<div class="bar">
<button type="button" onclick="utils.nestCreate('LeadGrid', 'createLeadGrid')" class="awe-btn mbtn">Create</button>
</div>
@(Html.Awe().Grid("LeadGrid")
//.Mod(o => o.PageInfo().InlineEdit(Url.Action("Edit"), Url.Action("Edit")))
.Url(Url.Action("GetLeadList", "Leads"))
.Height(0)
.PageSize(25)
.Nests(
new Nest { ButtonClass = "editnst", GetFunc = "utils.loadNestPopup('editLeadGrid')" })
.Columns(
new Column { Bind = "Id", Width = 50 },
new Column() { Bind = "Assigned To" },
new Column() { Bind = "LeadStatusId" },
new Column() { Bind = "CreatedOn", ClientFormatFunc = "FormatDateTime" },
new Column() { Bind = "CustomerName" },
new Column() { Bind = "CustomerEmail" },
new Column() { Bind = "CustomerPhone" },
new Column() { Bind = "TyreId" },
new Column() { ClientFormat = GridUtils.EditGridNestFormat(), Width = 50 }
)
Controller:
public ActionResult GetLeadList(GridParams g, string search)
{
g.PageSize = 25;
//g.Page = 1;
g.Paging = true;
var leadResult = GetLeads(new LeadSearchCriteriaDto { Page = g.Page, PageSize = 25 });
var items = AutoMapper.Mapper.Map<IList<Lead>, IList<LeadViewModel>>(leadResult.Data).AsQueryable();
return Json(new GridModelBuilder<LeadViewModel>(items, g)
{
Key = "Id",
GetItem = () => items.SingleOrDefault(x => x.Id == Convert.ToInt32(g.Key)),
Map = MapToGridModel,
ItemsCount = leadResult.ResultCount,
PageCount = leadResult.ResultCount / 25,
}.Build());
}
I have also copied all the javascript css and other related files from the demo project into my project to see if it was the issue still made no difference. I have debugged line by line the javascript and the only differences I see is deep in the code it seems to go to a different function but its in jquery code not sure why and I have the same version of jquery so it should be the same. I'm really at a loss.