MultiLookup control demo

  •  

MultiLookup needs a controller or urls to be specified, by default convention it will look for a controller with the same name as it + "MultiLookupController"

  • action GetItems - used to show the value in the readonly field, it will receive a v parameter which is going to be the keys of the selected items
  • action Search - gets data for the search result in it's popup, it receives a selected parameter that represents the selected values, it should return a Json(AjaxListResult), so it has same features as the AjaxList (table layout, custom item template)
  • action Selected - gets data for the selected items in the popup

MultiLookup Grid 

  •  
MultiLookup with grids inside the popup, done using the MultiLookupGrid mod that also uses PopupUrl extension.

MultiLookup with Custom Items  

  • Mango
    Mango
  • Apple
    Apple
  • Papaya
    Papaya

MultiLookupDemo/Index.cshtml
@(Html.Awe().MultiLookup(new MultiLookupOpt {
Name = "MealsCustomItem",
Controller = "MealsCustomItemMultiLookup",
Value = Db.Meals.Take(3).Select(o => o.Id).ToArray(),
Dropdown = false,
Modal = true,
CustomSearch = true,
Height = 700,
MaxWidth = 1000,
CssClass = "MLLimH" // limit caption height
}))

MultiLookup bound to many parents 

Parent Categories:
  •  
Parent Category:
Child Meals:
  •  

Setting predefined parameters 

Meals (categories = Fruits):
  •  



Comments