I seem to be getting myself in a real fluster here over something as simple as an UltraNumericEditor. From my understanding of these controls there are two properties which are used to format the display of the value as presented to the user. These are FormatString which applies to the appearance of the control value when not in edit mode, and MaskInput which is applied when the user is in edit mode and is entering/editing a value. You’d therefore think that it wouldn’t be that difficult to work out how to display a decimal value from 00.001 to 99.999.
1) For the life of me I can’t seem to get the control to display or allow for the setting of the third decimal place.
2) Can I alter the incremental value of the control such that when the user click on the spin control it increments the value by 0.005
3) When I initially added the control to the form the windows designer generated code seems to declare this control as Dim within the InitializeComponent thus the scope of the control is limited to this method. I can’t seem to work out why its not declared as Friend WithEvents outside of this block so that it can be seen from the forms main class object. Each time I make a modification to this form I have to manually alter the designer generated code to ensure that the control is declared with a greater scope, why is this happening? Any ideas welcome!
4) If infragistics were still at school, I’d have to mark their report card for this subject as “could do better”. Your references here are out of date … Your article here is next to useless and refers to a list of input mask characters which are not listed, or referenced. Any help on this one would be much appreciated as I’m about done banging my head against the monitor now.Kind Regards,Tim
That sounds like a bug to me. The ReadOnly settings should not have any effect on whether or not the control displays the NullText. I vaguely recall a bug like this which was fixed a long time ago. So if you are not already doing so, I recommend updating to the latest service release. If that doesn't help, let me know and I will forward this thread over to the Infragistics Developer Support team so they can check it out. Or you could report it to them directly if you prefer: Submit an incident to Infragistics Developer Support
Quick question with regards to the NullText setting on this control. Is it possible to show the NullText value if the control is set to readonly as after setting this value to true the control seems to only display "0" regardless of the FormatString setting or the NullText value.
Thanks Mike, it would appear that the form was corrupt.
Thanks Again for your help.
Hi Tim,
cazpian said:1) For the life of me I can’t seem to get the control to display or allow for the setting of the third decimal place.
Why not? What's the problem?
I just tried this out and it works fine for me:
this.ultraNumericEditor1.MaskInput = "nn.nnn"; this.ultraNumericEditor1.MaxValue = 9.999; this.ultraNumericEditor1.MinValue = 0.001; this.ultraNumericEditor1.NumericType = Infragistics.Win.UltraWinEditors.NumericType.Double; this.ultraNumericEditor1.SpinButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Always;
cazpian said:2) Can I alter the incremental value of the control such that when the user click on the spin control it increments the value by 0.005
this.ultraNumericEditor1.SpinIncrement = 0.005;
cazpian said:3) When I initially added the control to the form the windows designer generated code seems to declare this control as Dim within the InitializeComponent thus the scope of the control is limited to this method. I can’t seem to work out why its not declared as Friend WithEvents outside of this block so that it can be seen from the forms main class object. Each time I make a modification to this form I have to manually alter the designer generated code to ensure that the control is declared with a greater scope, why is this happening? Any ideas welcome!
I've never heard of anything like that happening before. It sounds like some kind of corruption in the form designer. Have you tried deleting the control and re-creating it?
update ...
2) Appears to be allowed using the spin increment setting.
3) I think mayhave been because the GenerateMember settings was false. I recreated the control with the default settings and this seems to have fixed this issue.