Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
How to enforce integer only in cell input
posted

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

Parents
No Data
Reply Children
No Data