We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to accept "." As decimal separator

Thread ID:

Created:

Updated:

Platform:

Replies:

121616 Jan 7,2016 12:11 PM Jan 11,2016 07:16 AM WPF 3
loading
Tags: CurrencyTextBox
BRIEF Frederic
Asked On January 7, 2016 12:11 PM

How to accept "," and "." As decimal separator with display "," on the screen like on the field "DoubleTextBox"

Marimuthu Sivalingam [Syncfusion]
Replied On January 8, 2016 05:23 AM

Hi Brief,

Thank you for using Syncfusion products.

We can change DecimalSeparator in DoubleTextBox by "NumberDecimalSeparator" property. We have prepared the sample to set the decimal separator as "," and you can download the sample from the below link.

Sample Link: 121616_DoubleTextBox

In your update you have mentioned "," and "." as decimal separator with display "," on the screen. We cannot display the same "," as DecimalSeparator for both "," and ".". Please let us know more details about your requirement if we have misunderstood your requirement.

Regards,
Marimuthu S.

BRIEF Frederic
Replied On January 8, 2016 05:51 AM

<syncfusion:DoubleTextBox  NumberGroupSeparator=" " NumberDecimalDigits="2" NumberDecimalSeparator="," TextWrapping="Wrap" Text="DoubleTextBox"  />

In this example with "DoubleTextBox" the keys "," and "." entry are accepted as decimal separator.

<syncfusion:CurrencyTextBox  Value="0" TextAlignment="Right"  CurrencyDecimalSeparator="," CurrencyDecimalDigits="2" CurrencyGroupSeparator=" " CurrencySymbolPosition="Right" NullValue="0"/>

In this example with "CurrencyTextBox" keys only, "," is accepted as decimal separator entry.

I would accept the keys "," and "." as decimal separator and having to display "," as decimal separator.

Marimuthu Sivalingam [Syncfusion]
Replied On January 11, 2016 07:16 AM

Hi Brief,

Thank you for your update.

As per the implementation of CurrencyTextBox, it would accept DecimalSepartor as "." and "," but we cannot set GroupSeparator and Decimaleparator of CurrencyTextBox as the same. In your sample, you have not set the GroupSeparator. When the GroupSeparator is empty, then it will take the GroupSepartor as "," from the default culture. Hence, the GroupSeparator and DecimalSeparator will be the same, and you will not be able to set the DecimalSepartor as "," and ".". We have prepared a sample to achieve your requirement. Please download it from the following location:

Sample:  121616_currencyTextBoxSample

Regards,
Marimuthu S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;