CrudInLookup/DinnerMultiLookup.cshtml
@model AweCoreDemo.ViewModels.Input.Lookup.LookupPopupInput
@functions{
Column[] getColumns(string gridId)
{
return new[]
{
new Column {Bind = "Id", Width = 120, ClientFormat = GridUtils.MoveBtn() + " .(Id)"}.Mod(o => o.Nohide()),
new Column {Bind = "Name"}.Mod(o => o.Nohide()),
new Column {Bind = "Date"},
new Column {Bind = "Chef.FirstName,Chef.LastName", Prop = "ChefName", Header = "Chef"},
new Column {Prop = "Meals", Header = "Meals"},
new Column {ClientFormat = Html.EditFormatForGrid(gridId, nofocus: true), Width = GridUtils.EditBtnWidth}.Mod(o => o.Nohide()),
new Column {ClientFormat = Html.DeleteFormatForGrid(gridId, nofocus: true), Width = GridUtils.DeleteBtnWidth}.Mod(o => o.Nohide())
};
}
}
@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")).ColumnsAutohide())
.CssClass("awe-srl")
.Url(Url.Action("DinnersGridSearch"))
.Parent(o => o.Search, "search")
.Height(200)
.Groupable(false)
.Columns(getColumns(grid1)))
<br />
@(Html.Awe().Grid(grid2)
.Mod(o => o.PageInfo().KeyNav().MovableRows(x => x.DropOn("DinnersGrid1").DropOn("DinnersGrid2")).ColumnsAutohide())
.CssClass("awe-sel")
.Url(Url.Action("DinnersGridSelected"))
.Height(200)
.Groupable(false)
.Paging(false)
.Columns(getColumns(grid2)))
}