Lookups with CRUD functionality in the Popup

Lookup:
 
MultiLookup:
  •  

CrudInLookup/Index.cshtml
@using (Html.BeginForm())
{
<div class="efield">
<div class="elabel">
Lookup:
</div>
<div class="einput">
@(Html.Awe().LookupFor(o => o.Dinner2)
.LookupGrid(Url.Action("DinnerLookup"))
.GetItemUrl(Url.Action("GetDinnerItem", "Data"))
.Fullscreen())
</div>
@Html.ValidationMessageFor(o => o.Dinner2)
</div>
<div class="efield">
<div class="elabel">
MultiLookup:
</div>
<div class="einput">
@(Html.Awe().MultiLookupFor(o => o.Dinner3)
.MultiLookupGrid(Url.Action("DinnerMultiLookup"))
.GetItemsUrl(Url.Action("GetDinnerItems", "Data"))
.Fullscreen())
</div>
@Html.ValidationMessageFor(o => o.Dinner3)
</div>
<input type="submit" value="Submit" class="awe-btn" />
}
CrudInLookup/DinnerLookup.cshtml
@model AwesomeMvcDemo.ViewModels.Input.Lookup.LookupPopupInput
@using (Html.Awe().BeginContext())
{
var gridId = "DinnersGrid";

@Html.InitCrudPopupsForGrid(gridId, "DinnersGridCrud")

<div class="bar">
<div style="float: right;">
@Html.Awe().TextBoxFor(o => o.Search).Placeholder("search...").CssClass("searchtxt")
</div>
@Html.CreateButtonForGrid(gridId)
</div>

@(Html.Awe().Grid(gridId)
.Mod(o => o.PageInfo().ColumnsSelector().KeyNav())
.Url(Url.Action("GridGetItems", "DinnersGridCrud"))
.Parent(o => o.Search, "search")
.Selectable(SelectionType.Single)
.Height(350)
.Columns(
new Column { Bind = "Id", Width = 55 },
new Column { Bind = "Name" },
new Column { Bind = "Date" },
new Column { Bind = "Chef.FirstName,Chef.LastName", ClientFormat = ".ChefName", Header = "Chef" },
new Column { ClientFormat = ".Meals", Header = "Meals" },
new Column { ClientFormat = Html.EditFormatForGrid(gridId, nofocus: true), Width = 50 }.Mod(o => o.Nohide()),
new Column { ClientFormat = Html.DeleteFormatForGrid(gridId, nofocus: true), Width = 50 }.Mod(o => o.Nohide())))
}
CrudInLookup/DinnerMultiLookup.cshtml
@model AwesomeMvcDemo.ViewModels.Input.Lookup.LookupPopupInput
@using (Html.Awe().BeginContext())
{
var grid1 = "DinnersGrid1";
var grid2 = "DinnersGrid2";

@Html.InitCrudPopupsForGrid(grid1, "DinnersGridCrud")
@Html.InitCrudPopupsForGrid(grid2, "DinnersGridCrud")

<div class="bar">
<div style="float: right;">
@Html.Awe().TextBoxFor(o => o.Search).Placeholder("search...").CssClass("searchtxt")
</div>
@Html.CreateButtonForGrid(grid1)
</div>

@(Html.Awe().Grid(grid1)
.Mod(o => o.PageInfo().KeyNav().MovableRows(x => x.DropOn("DinnersGrid1").DropOn("DinnersGrid2")))
.CssClass("awe-srl")
.Url(Url.Action("DinnersGridSearch"))
.Parent(o => o.Search, "search")
.Height(200)
.Groupable(false)
.Columns(new Column { Bind = "Id", Width = 120, ClientFormat = GridUtils.MoveBtn() + " .Id" },
new Column { Bind = "Name" },
new Column { Bind = "Date" },
new Column { Bind = "Chef.FirstName,Chef.LastName", ClientFormat = ".ChefName", Header = "Chef" },
new Column { ClientFormat = ".Meals", Header = "Meals" },
new Column { ClientFormat = Html.EditFormatForGrid(grid1, nofocus:true), Width = 50 }.Mod(o => o.Nohide()),
new Column { ClientFormat = Html.DeleteFormatForGrid(grid1, nofocus: true), Width = 50 }.Mod(o => o.Nohide())))
<br />

@(Html.Awe().Grid(grid2)
.Mod(o => o.PageInfo().KeyNav().MovableRows(x => x.DropOn("DinnersGrid1").DropOn("DinnersGrid2")))
.CssClass("awe-sel")
.Url(Url.Action("DinnersGridSelected"))
.Height(200)
.Groupable(false)
.Paging(false)
.Columns(new Column { Bind = "Id", Width = 120, ClientFormat = GridUtils.MoveBtn() + " .Id" },
new Column { Bind = "Name" },
new Column { Bind = "Date" },
new Column { Bind = "Chef.FirstName,Chef.LastName", ClientFormat = ".ChefName", Header = "Chef" },
new Column { ClientFormat = ".Meals", Header = "Meals" },
new Column { ClientFormat = Html.EditFormatForGrid(grid2, nofocus: true), Width = 50 }.Mod(o => o.Nohide()),
new Column { ClientFormat = Html.DeleteFormatForGrid(grid2, nofocus:true), Width = 50 }.Mod(o => o.Nohide())))
}