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
1725
Strange NumericEditor input behaviour
posted

I have a grid where each column has a different numeric editor control set for the column with different min/max values. This is all working as expected.

My problem is that I have (for example) a column with a numeric editor mask input set to "n.nn" and with a max value of 4. If I tab to this field and enter a value in the 1s place that is greater then the max value the editor places the value to in the first decimal place. So, if I try to enter

6.__ what I get is _.6__

While it is true that the value I'm entering is greater than the max allowed what I was expecting is that the editor would either not accept the value in that position or would produce some form of validation error so that I could tell the user that the value is out of range. Placing the value as it does is currently causing lots of value data entry errors.

Am I missing something here? The code I have is like the following

 UltraNumericEditor normalNumericEditor = new UltraNumericEditor();
normalNumericEditor.NumericType = NumericType.Double;
normalNumericEditor.FormatString = "F";
if (question.MaxValue < 10.0)
    normalNumericEditor.MaskInput = "n" + numberFormatString;
else if (question.MaxValue < 100.0)
    normalNumericEditor.MaskInput = "nn" + numberFormatString;
else normalNumericEditor.MaskInput = "nnn" + numberFormatString;
normalNumericEditor.Appearance.TextHAlign = HAlign.Center;
gridColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;
gridColumn.Format = normalNumericEditor.FormatString;
gridColumn.MaskInput = normalNumericEditor.MaskInput;
gridColumn.EditorControl = normalNumericEditor;

Is there something I'm not doing right here?

Neil