I have a Kendo MVC dropdown list that looks like what you see below. I would like to set the background color of each item in the list based on information contained in the Employee entity being returned from the read operation. Note, I won't be able to use any sort of class to do this because I won't know ahead of time what the color should be. The color will be contained in each Employee entity returned. Can this be done?
@(Html.Kendo().DropDownListFor(m => m)
.Name("EmployeeDropDown")
.DataTextField("DropDownText")
.DataValueField("RowId")
.OptionLabel("Select Employee...")
.AutoBind(false)
.Filter("contains")
.HtmlAttributes(new { style = "width: 525px" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetEmployeesForDropDown", "Employee");
})
.ServerFiltering(true); // Let's do server side filtering
})
.Events(e => {
e.Select("onSelect");
})