I have a grid with a ComboBox:
[...]
.Columns(c=> {
c.ForeignKey(o => o.Item, (IEnumerable<MyIdValueClass>)ViewBag.FK_Items, "Id", "Value").EditorTemplateName("ComboBox");
[...]
public class MyIdValueClass
{
public string Id { get; set; }
public string Value { get; set; }
}
Template Code:
@(Html.Kendo().ComboBox()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
.BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
)
Whenever I type in a new entry (not selected from the dropdown) and click Update, the entry is saved into the database properly, but it shows up blank in the Grid. If you subsequently click Edit, the value appears so that you can edit it. Click Update or Cancel and it is still blank. Only after refreshing the page will the value show up properly. Entries selected from the dropdown list display properly. How can I get the typed entries to display properly?
Thanks in advance,
Gary
[...]
.Columns(c=> {
c.ForeignKey(o => o.Item, (IEnumerable<MyIdValueClass>)ViewBag.FK_Items, "Id", "Value").EditorTemplateName("ComboBox");
[...]
public class MyIdValueClass
{
public string Id { get; set; }
public string Value { get; set; }
}
Template Code:
@(Html.Kendo().ComboBox()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
.BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
)
Whenever I type in a new entry (not selected from the dropdown) and click Update, the entry is saved into the database properly, but it shows up blank in the Grid. If you subsequently click Edit, the value appears so that you can edit it. Click Update or Cancel and it is still blank. Only after refreshing the page will the value show up properly. Entries selected from the dropdown list display properly. How can I get the typed entries to display properly?
Thanks in advance,
Gary