I'm having a problem with the ultraNumeric Editor with the following settings:
this.ultraNumericEditor1.AlwaysInEditMode = true;
this.ultraNumericEditor1.FormatString = "###.# MHz";
this.ultraNumericEditor1.MaskClipMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.Raw;
this.ultraNumericEditor1.MaxValue = 600;
this.ultraNumericEditor1.Name = "ultraNumericEditor1";
this.ultraNumericEditor1.PromptChar = ' ';
this.ultraNumericEditor1.SpinButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Always;
this.ultraNumericEditor1.TabIndex = 0;
This will throw a System.FormatException before the form displays complaining that the input string was not in a correct format. If I remove the SpinIncrement settting then everything is fine. What I would like to do is use the SpinIncrement to increment the number by some fractional amount, like 1.5. Am I mis-interpreting the SpinIncrement here? This only seems to appear when using the literals? in the MaskInput and FormatString. The following code works fine:
this.ultraNumericEditor1.FormatProvider = new System.Globalization.CultureInfo("en-US");
this.ultraNumericEditor1.Location = new System.Drawing.Point(124, 73);
this.ultraNumericEditor1.MaskInput = "nnn.n";
this.ultraNumericEditor1.MinValue = 0;
this.ultraNumericEditor1.NumericType = Infragistics.Win.UltraWinEditors.NumericType.Double;
this.ultraNumericEditor1.Size = new System.Drawing.Size(100, 21);
this.ultraNumericEditor1.SpinIncrement = 1.5;
Is there a way to get this to work the way I want?
Thanks
Using the code, you provided I was able to reproduce the FormatException. It appears that this may be a bug in calculating the maximum possible spin value when there are literals within the MaskInput.
Unfortunately, there is no easy workaround for your issue. The only recommendation I can provide is to submit a support request to our Develoepr Support team, so that it can be looked at indepth, and you will get notified when a fix is available. To minimize turnaround time, make sure to indicate mention this forum post in the support request. In the meantime, I would suggest removing the line that set AlwaysInEditMode to true, and only have the literal on the FormatString.
The control will not display the literal while it has focus, but they will be shown once focus is lost.
Thanks for the reply, the workaround seems to work, but would be nice to see the literals when control has focus. I submitted a support request like you suggested.
This issue has been resolved with the latest Hotfix 2064.