Lookup Grid

Meal:
 

Lookup with grid inside the popup, done using the lookupgrid mod that also uses PopupUrl extension.

Lookup with Custom Items template

Meal:
 

The Search action of the LookupController returns json of AjaxListResult, we need to set the string AjaxListResult.Content instead of Items in order to achieve Custom Item Template, exactly the same as for the AjaxList helper.

Lookup bound parents

Parent Categories:
  •  
Parent Category:
Child Meal:
 

Binding to parents and setting predefined parameters is done the same as for the AjaxDropdown using .Parent() and .Parameter(), values are passed to both GetItem and Search actions.
Unlike other controls the Lookup won't change its value when the value of the parent is changed.

Setting predefinded parameters

Meal1 (categories = {Fruits, Legumes}):
 



Comments