I have a Kendo grid which need a dropdown in some fields, i have used editor template for that (http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/editor-templates), everything is working fine, but when i select a value the grid shows the id of the dropdown element insted of its text value.
This is my partial view of the template
@(Html.Kendo().DropDownList()
.Name("ClasificacionId")
.DataValueField("Value")
.DataTextField("Text")
.BindTo((System.Collections.IEnumerable)ViewBag.ClasificacionId)
)
This is how i'm passing the list value to the view
ViewBag.ClasificacionId = new SelectList(db.ClasificacionMercancia, "ClasificacionId", "Descripcion");
and this is how the row its defined in the kendo grid with razor sintax
.Columns(columns =>
{
columns.Bound(o => o.ClasificacionId).Width(120).ClientTemplate("#= ClasificacionId #<input type='hidden' name='Fracion[#= index(data) #].ClasificacionId' value='#= ClasificacionId #'/>");
i need that Client template to save all editable kendo grid values to a List in my model, but i want to show the text value of the dropdown to the user insted of the id value.