This question is locked. New answers and comments are not allowed.
I have a simple model where I wish to have a enum represented as a drop down in the grid.
Model:
The grid:
However, when the grid is rendered I never get a drop down for the enum type. Any suggestions?
Thanks,
Jerret
Model:
public class VariableDataFieldDefinition{ public enum DataType { [Description("Amount")] Decimal, [Description("String")] String, [Description("Date with Time")] DateTime, [Description("Number")] Integer } public int Id { get; set; } [Required] [Display(Name = "Field Name")] public string FieldName { get; set; } [Required] [Display(Name = "Field Type")] public DataType FieldType { get; set; }}The grid:
@(Html.Telerik().Grid<VariableDataFieldDefinition>() .Name("Grid") .DataKeys(keys => { keys.Add(p => p.Id); }) .ToolBar(commands => { commands.Insert(); }) .DataBinding(dataBinding => dataBinding.Ajax() .Delete("_DeleteBatchEditing", "Grid") ) .Columns(columns => { columns.Bound(p => p.FieldName).Width(210); columns.Bound(p => p.FieldType).Width(130); columns.Command(commands => commands.Delete()).Width(180).Title("Delete"); }) .Editable(editing => editing.Mode(GridEditMode.InCell)) .Scrollable() )However, when the grid is rendered I never get a drop down for the enum type. Any suggestions?
Thanks,
Jerret