/Views/Home/Index.cshtmlのファイルにグリッドがあるとします。
@model IEnumerable<KendoMVCWrappers.Models.StockWebAndDetailsView>
@( Html.Kendo().Grid(Model)
.Name("Grid")
@* Other columns and dataSource in here *@
columns.Bound("QuantityToEnquiry").Filterable(false).Sortable(false)
.EditorTemplateName("QuantityToEnquiry");
})
そして、/Views/EditorTemplateName/QuantityToEnquiry.cshtmlにファイルがあります( ~/Views/Shared/EditorTemplates/も試しました ):
@(Html.Kendo().ComboBox()
.Name("QuantityToEnquiry")
.Value("1")
.BindTo(Enumerable.Range(1, 100).ToList())
私が持っているモデルでは:
public class StockWebAndDetailsView
{
[UIHint("QuantityToEnquiry")]
public int QuantityToEnquiry { get; set; }
}
表示されているデータはnull、値が「null」の文字列です。理由はわかりません。