I am trying to create a multifilter from enum data type column using the Item Template. But Item Template JavaScript function is not being called and data is not being shown in combo box for some reason. I am looking for a help from expertise to solve.
Enum Records
public enum EmpTypes
{
[Display(Name = "Service")]
Service = 0,
[Display(Name = "Sales")]
Sales = 1,
[Display(Name = "Purchase")]
Purchase = 2,
[Display(Name = "Office")]
Office = 3
}
Kendo Grid
columns.Bound(c => c.EmpTypes).Title("Type")
.Filterable(filterable => filterable
.Multi(true)
.UI("").DataSource(s=>s.Read(r=>r.Action(“GetEmpTypes”,”Report”)))
.ItemTemplate(“typetemplate”));
<script>
function typetemplate(e)
{
alert('Test');
}
</script>
Action Method in MVC controller
Public ActionResult GetEmpTypes()
{
List<EmpType> emptypes = new List<EmpType>();
emptypes.Add(EmpType.Sales)
emptypes.Add(EmpType.Report)
return Json(emptypes,JsonRequestBehavior.AllowGet);
}