I'm using a editor template to display a combo box for one of the columns in my grid. I want to set the initial text of the combo box from a model property other than the value property. I could normally do this using the Text operator, but because this is inside a grid, I need to load from the data of that particular row. Here's my editor template code:
@(Html.Kendo().ComboBoxFor(Function(x) x) _
.DataTextField("PartNumber") _
.DataValueField("PartID") _
.MinLength(2) _
.AutoBind(False) _
.Text( "what do I put here" ) _
.Filter(FilterType.StartsWith) _
.DataSource(Sub(dataSource)
dataSource _
.Read(Sub(reader)
reader.Action("StartsWith", "Part")
reader.Type(HttpVerbs.Post)
End Sub) _
.ServerFiltering(True)
End Sub)
)