I have a Kendo grid with a Employee dropdown column, much like the examples that they provide. My dataset has a employee ID. I created a model that holds the employee object and deliver that to my view. Here's a snip of the controller code:
select new
{
ShiftDataID = g.Key.ShiftDataID,
EmployeeID = g.Key.EmployeeID,
Employee = (from e in dbContext.Employees
where (e.EmployeeID == g.Key.EmployeeID)
select new EmployeeDTO
{
EmployeeID = e.EmployeeID,
EmployeeName = e.EmployeeName
}).FirstOrDefault(),
CaseCount = g.Key.CaseCount...
Here's the view:
@(Html.Kendo().Grid(Model)
.Name("ShiftDataGrid")
.Columns(columns =>
{
columns.Bound(x => x.Employee).ClientTemplate("#=Employee.EmployeeName#").Title("Employee").Width(75);
(removed other columns for simplicity)
OK, so all is good. When the grid renders, it shows an employee column with the correct employee names. HOWEVER, when user clicks on the name to change it, I get the following:
So, my problem is that it's not rendering the drop-down list control, but the Employee objects properties. I'm not sure what I'm doing wrong, any help would be appreciate it.
Thanks, -Alex