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. Image for the cookie policy date
close icon

How to accept "." As decimal separator

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

3 Replies

MS Marimuthu Sivalingam Syncfusion Team January 8, 2016 10:23 AM UTC

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.


AR Arnaud January 8, 2016 10:51 AM UTC

<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.


MS Marimuthu Sivalingam Syncfusion Team January 11, 2016 12:16 PM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon