This question is locked. New answers and comments are not allowed.
I have an ajax bound grid that is working correctly using an editor template.
When the user clicks edit or insert, the in line editor works as expected and the drop down list appears using a complex object. The issue I'm having is that when the grid is in Display mode, the field is showing the Id of the drop down field and I need it to display the selected text.
example
cols.bound(c => c.IngredientId)
IngredientId has a UIHint that points to the editortemplate that displays the dropdown.
@model int
@(
Html.Telerik().DropDownListFor(e => e).BindTo(new SelectList(ViewBag.IngredientList, "Id", "Name"))
)
After the insert or save the column in the grid displays the Id field and I need it to display the Name of the ingredient they selected... I'm assuming this is done with a displaytemplate, but I'm curious how to implement that...
thanks.
When the user clicks edit or insert, the in line editor works as expected and the drop down list appears using a complex object. The issue I'm having is that when the grid is in Display mode, the field is showing the Id of the drop down field and I need it to display the selected text.
example
cols.bound(c => c.IngredientId)
IngredientId has a UIHint that points to the editortemplate that displays the dropdown.
@model int
@(
Html.Telerik().DropDownListFor(e => e).BindTo(new SelectList(ViewBag.IngredientList, "Id", "Name"))
)
After the insert or save the column in the grid displays the Id field and I need it to display the Name of the ingredient they selected... I'm assuming this is done with a displaytemplate, but I'm curious how to implement that...
thanks.