Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > NumberFormatInfo not initialized in 2011Q2

Answered NumberFormatInfo not initialized in 2011Q2

Feed from this thread
  • IT Services avatar

    Posted on Jul 21, 2011 (permalink)

    Hello,

    I have a minor problem with the RadNumericUpDown. Before the Q2-Update, the NumberFormatInfo-Property of the RadNumericUpDown was initialized and the following code run without problems...

    InitializeComponent();
    myNumericSelector.NumberFormatInfo.NumberGroupSeparator = string.Empty;

    After the Q2-Update the NumberFormatInfo-Property is null and our application crashed. It was easy to fix, but I am curious: was this change intentional and will the property be null in future versions?

    Best regards,
    Thomas

    Reply

  • Answer Valeri Hristov Valeri Hristov admin's avatar

    Posted on Jul 21, 2011 (permalink)

    Hello Thomas,

    Unfortunately this change is intentional and was made to avoid a problem with Blend, which always tried to serialize the property value in XAML and since NumberFormatInfo cannot be instantiated in XAML in Silverlight, this lead to invalid code... I apologize for the inconvenience.

    Best wishes,
    Valeri Hristov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • IT Services avatar

    Posted on Jul 21, 2011 (permalink)

    Hello Valeri,

    thank you very much for your explanation. I can definitely live with that ;)

    Best regards,
    Thomas

    Reply

  • Josh avatar

    Posted on Jul 29, 2011 (permalink)

    Is there a workaround to remove the group separator?  We have many NumericUpDowns throughout our application that are used to display a year.  We do not want a comma in the year and in previous versions this worked.

    -Josh

    Reply

  • Yana Yana admin's avatar

    Posted on Aug 1, 2011 (permalink)

    Hi Josh,

    You should set the NumberFormatInfo like this:

    numericUpDown.NumberFormatInfo = new NumberFormatInfo() {
       NumberGroupSeparator = string.Empty
    };

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > NumberFormatInfo not initialized in 2011Q2
Related resources for "NumberFormatInfo not initialized in 2011Q2"

Silverlight NumericUpDown Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]