Hi,
Is there a way to enforce integer only inputs when entering cell data. The code for my grid is
@(Html.Infragistics().Grid(Model.stepActivities).ID("Grid").Height("250px").Width("98%").AutoGenerateColumns(false).AutoGenerateLayouts(false).AutoCommit(true).PrimaryKey("ActvtyKey").Columns(column =>{column.For(x => x.ActvtyKey).DataType("number").Hidden(true);column.For(x => x.MetrcTargtNbr).Width("7%").HeaderText("Target");column.For(x => x.MetrcInProcssNbr).Width("7%").HeaderText("In Process");column.For(x => x.MetrcCompltdNbr).Width("7%").HeaderText("Completed");}).Features(feature =>{feature.Updating().ColumnSettings(cs =>{cs.ColumnSetting().ColumnKey("ActvtyKey").ReadOnly(false);cs.ColumnSetting().ColumnKey("MetrcTargtNbr").EditorType(ColumnEditorType.Numeric).Required(false);cs.ColumnSetting().ColumnKey("MetrcInProcssNbr").EditorType(ColumnEditorType.Numeric).Required(false);cs.ColumnSetting().ColumnKey("MetrcCompltdNbr").EditorType(ColumnEditorType.Numeric).Required(false);}).HorizontalMoveOnEnter(true).ExcelNavigationMode(true).EditMode(GridEditMode.Row);}).DataSourceUrl(Url.Action("GetActivities")).DataBind().Render() )
The Numeric column editor type allows for decimals which I can't have. I'd appreciate your help. Thanks
Hello C A,
Please try to set 'format' option equals to 'int' to the column's definition: http://help.infragistics.com/jQuery/2014.2/ui.iggrid#options:columns.format For instance: column.For(x => x.ActvtyKey).DataType("number").Format("int").Hidden(true);
If you need further assistance, feel free to contact me.
Regards,
Tsanna