Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > PropertyGrid > Numeric datatypes

Not answered Numeric datatypes

Feed from this thread
  • Posted on Nov 17, 2011 (permalink)

    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.

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Nov 21, 2011 (permalink)

    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:

    private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
    {
      PropertyGridSpinEditor editor = e.Editor as PropertyGridSpinEditor;
     
      if (editor != null)
      {
        editor.MaxValue = 200;
      }
    }

    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.

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on Nov 21, 2011 (permalink)

    Thank you.  I already added similar code for that.  

    However, I would like to suggest the control automatically defaults to the MinValue and MaxValue when the datatype is a value type.

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Nov 22, 2011 (permalink)

    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > PropertyGrid > Numeric datatypes