KendoUI Grid Default Value with Data Annotation
问题 I am using Kendo UI Grid with ASP.NET MVC Helpers and auto generated columns. I have [DefaultValue(60 * 60)] annotation in my view model but Kendo helpers doesn't seem to respect that. Can I have default value specified (probably with data annotations) without having to manually describe the columns? 回答1: if you defined the columns in the grid manually, you need to set the default value like this despite you defined the default value in the annotation or not @(Html.Kendo() .Grid() .DataSource