Could you help me to use the parent in multlookup below has class and html.
[HttpPost]
public ActionResult Search (string search, int [] selected, int page, int? parent)
{
var r = repo.Where (o => o.Descricao.Contains (search) && o.Extensao == 1);
if (selected! = null) r = r.Where (o =>! selected.Contains (o.Id) && o.Evento.Id == parent). AsQueryable ();
r = r.OrderBy (o => O.Data);
return Json (new {Items = AjaxListResult r.ToArray (.) Select (o => new KeyContent (o.Id, o.Descricao))});
}
public ActionResult GetItems (int [] v, int? parent)
{
return Json (repo.GetAll ()
. Where (o => v.Contains (o.Id) && o.Evento.Id == parent)
. ToArray ()
. Select (o => new KeyContent (o.Id, o.Descricao)));
}
<div class="field">
<label style="width:120px;"> Participant *: </ label>
@ Html.Awe (). LookupFor (o => o.ParticipanteId.) Title ("List of speakers.") Parent (o => o.EventoId)
@ Html.ValidationMessageFor (o => o.ParticipanteId)
</ Div>
public class InscricaoInput: Input
{
[Required (ErrorMessageResourceName = "required", ErrorMessageResourceType = typeof (Mui))]
[UIHint ("AjaxDropdown")]
[Display (Name = "Event")]
public int EventoId {get; sets;}
[Display (Name = "Participant")]
[UIHint ("Lookup")]
public int ParticipanteId {get; sets;}
[UIHint ("TextArea")]
[Display (Name = "Note")]
public string Note {get; sets;}
[UIHint ("multilookup")]
[AdditionalMetadata ("DragAndDrop", true)]
/ / [AdditionalMetadata ("PopupClass", "PalestrantesLookup")]
[Multilookup (Fullscreen = true)]
/ / [Display (ResourceType = typeof (Mui), Name = "Speakers")]
public IEnumerable <int> Schedules {get; sets;}