I have noticed both in the demo and my own test code that if a property is any numeric type, the max value is 100. How do I control this?
Also, I noticed that on the validating, the data types of the OldValue and NewValue are not the same, e.g. OldValue is Integer but NewValue is Decimal.
3 Answers, 1 is accepted
0
Ivan Petrov
Telerik team
answered on 21 Nov 2011, 04:43 PM
Hello Jason Parrish,
Thank you for writing.
You can edit the properties of the spin editor in the RadPropertyGrid EditorInitialized event. Here is a code snippet which demonstrates this:
The reason for the NewValue and old value to be of different types is that the old value is the value of the property and the new value is taken form the editor. And since we have one editor for all numeric types there will be differences.
I hope this explains things. Should you have further questions I would be happy to help.
Greetings,
Ivan Petrov
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.
However, I would like to suggest the control automatically defaults to the MinValue and MaxValue when the datatype is a value type.
0
Ivan Petrov
Telerik team
answered on 22 Nov 2011, 01:02 PM
Hi Jason Parrish,
Thank you for writing back.
This seems as a pretty reasonable idea. I have logged the idea into our Public Issue Tracking System - PITS. You can track the progress of this feature and vote it up on the following link - PITS Feature.
I have also updated your telerik points for the good suggestion.
All the best,
Ivan Petrov
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.