我在ASP.Net MVC应用程序中使用Kendo网格.如果我有以下网格定义,
@(Html.Kendo().Grid(Model) //Bind the grid to ViewBag.Products .Name("grid") .Columns(columns => { columns.Bound(p => p.FullName); columns.Bound(p => p.MyEnum) }) .Groupable() .Pageable() .Sortable() .Scrollable(scr => scr.Height(600)) .Filterable() )
其中一列是Enum.我的枚举定义是:
public enum MyEnum { [Display(AutoGenerateField = false,Name = "My enum 1",Description = "My Enum 1")] EnumOne,[Display(Name = "My Enum 2")] EnumTwo }
如何让每行显示“My Enum 1”或“My Enum 2”?
提前致谢!