<ejs-autocomplete id="employees" dataSource="@ViewBag.data" placeholder="e.g. Andrew Fuller" popupHeight="450px"
itemTemplate="@Html.Raw("<div><div class=\"ename\"> ${Name} </div><div class=\"job\"> ${Designation} </div></div>")">
<e-autocomplete-fields value="Name"></e-autocomplete-fields>
</ejs-autocomplete>
[models]
public string Name { get; set; }
public string Eimg { get; set; }
public string Designation { get; set; }
public string Country { get; set; }
public List<ErrorViewModel> EmployeesList()
{
List<ErrorViewModel> emp = new List<Models.ErrorViewModel>();
emp.Add(new ErrorViewModel { Name = "Águilas", Eimg = "7", Designation = "Team Lead", Country = "England" });
emp.Add(new ErrorViewModel { Name = "Ajedrez", Eimg = "1", Designation = "Developer", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Ala Delta", Eimg = "3", Designation = "HR", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Álbumes de Música", Eimg = "2", Designation = "Product Manager", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Gülümsemek", Eimg = "6", Designation = "Developer", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Teşekkürler", Eimg = "9", Designation = "Team Lead", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Güle güle", Eimg = "4", Designation = "Product Manager", Country = "USA" });
emp.Add(new ErrorViewModel { Name = "Gülhatmi", Eimg = "8", Designation = "Developer ", Country = "England" });
emp.Add(new ErrorViewModel { Name = "Gülünç", Eimg = "10", Designation = "CEO", Country = "England" });
return emp;
}
|