I'm working with Kendo UI on an MVC application. We have a grid and when the user opens the row for editing we have a dropDownList that holds company names. I'm trying to get the DDL to default to the company name that's pertinent to the row.
Here's the column code:
columns.Bound(e => e.company_business_name).Width(220).Title("Company")
and here's the editorTemplate code:
@(Html.Kendo().DropDownListFor(m => m)
and the method that fills the DDL:
private void PopulateCompanies()
var companyList = new List<
if (!string.IsNullOrEmpty(Session["Companies"] as string))
companyList = (List<
companyList = new DataAccess().GetCompanies(CurrentSettings.getUser().userId);
ViewData["Companies"] = companyList;
The dropDownList is populating, and displays when I click edit, but the selected value is blank. How can I set it to the value that was in the grid when it was in display mode?