This question is locked. New answers and comments are not allowed.
Hi
I am having trouble getting the grid to display a dropdown list when using the EntityFramework as the datasource.
My EntityFramwork exposes a property for Customer.
My Controller is getting the list of Customers and binding it to the grid.
The Customer has a property called "Industry"
When I edit the grid I want the list of Industries to appear as a dropdown list in the grid.
EditorTemplate looks like the following:
When I edit the customer row, the Industry field appears as a textbox.
I read that the UIHint should be applied to the Industry property, but b/c the EntityFramework genereates the Customer class, how do I apply the UIHInt attribute to the Industry property?
I am having trouble getting the grid to display a dropdown list when using the EntityFramework as the datasource.
My EntityFramwork exposes a property for Customer.
My Controller is getting the list of Customers and binding it to the grid.
The Customer has a property called "Industry"
When I edit the grid I want the list of Industries to appear as a dropdown list in the grid.
EditorTemplate looks like the following:
@model string @( Html.Telerik().DropDownListFor(e => e).BindTo(new SelectList(ViewBag.Industries)) )When I edit the customer row, the Industry field appears as a textbox.
I read that the UIHint should be applied to the Industry property, but b/c the EntityFramework genereates the Customer class, how do I apply the UIHInt attribute to the Industry property?