This is a migrated thread and some comments may be shown as answers.

NumberFormatInfo not initialized in 2011Q2

4 Answers 83 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
naip
Top achievements
Rank 2
naip asked on 21 Jul 2011, 12:16 PM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 21 Jul 2011, 12:36 PM
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!

0
naip
Top achievements
Rank 2
answered on 21 Jul 2011, 02:26 PM
Hello Valeri,

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

Best regards,
Thomas
0
Josh
Top achievements
Rank 1
answered on 29 Jul 2011, 08:45 PM
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
0
Yana
Telerik team
answered on 01 Aug 2011, 09:10 AM
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 >>

Tags
NumericUpDown
Asked by
naip
Top achievements
Rank 2
Answers by
Valeri Hristov
Telerik team
naip
Top achievements
Rank 2
Josh
Top achievements
Rank 1
Yana
Telerik team
Share this question
or