Hello,
I hope this is a simple question, can someone show me how to define default values for an MVC igGrid. Here's a snippet of my code:
.Features(feature => { feature.Updating().ColumnSettings(cs => { cs.ColumnSetting().ColumnKey("ActvtyKey").ReadOnly(true); cs.ColumnSetting().ColumnKey("ActvtyNm").Required(true).TextEditorOptions(o => o.ValidatorOptions(vo => vo.MinLength(2).KeepFocus(ValidatorKeepFocus.Never))); cs.ColumnSetting().ColumnKey("TrackngMetrcTxt").EditorType(ColumnEditorType.Text).Required(false); cs.ColumnSetting().ColumnKey("OngngStatsFlg").EditorType(ColumnEditorType.Combo).Required(false).ComboEditorOptions(co => co.DataSource(ViewBag.StatusText).ValueKey("FlagKey").TextKey("Status").Mode(ComboMode.DropDown)); }) .HorizontalMoveOnEnter(true) .ExcelNavigationMode(true) .EditMode(GridEditMode.Row); })
Can you please show how to set a default value for the text and combo editor please. Thank you.