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

SfNumericTextBox

Hi,

For the certain cultures, the currency symbol displays to the right of the digits.  Is there a way to get it to display consistently on the left (like the $ symbol for en-US).
For example, the Euro sign is on the right of the digits , but i need to have my app have a consistent look and Euro can also appear to the left of the digits.

Secondly, is there a way to specify the Currency sybmol directly.  At the moment you can only specify the currency symbol via a culture.   My app supports 3 currencies only    Dollar, Euro and Pound, so I know what those symbols are and would rather be able to set a currency symbol on the SfNumericText called Currency.   Is that somehow possible with the current version?

Thanks

5 Replies

VJ Victory Jessie Selvam D Syncfusion Team October 30, 2014 05:20 AM UTC

Hi Roger,

Thank you for using Syncfusion products.

Query #1: Is there a way to get it to display consistently on the left ?
Yes, you can display the currency symbol in left by setting Culture.NumberFormat.CurrencyPositivePattern = 0. We have prepared a sample for achieving this requirement.

Query #2:is there a way to specify the Currency symbol directly?
Currently there is no support in SfNumericTextBox to specify currency symbol directly. You can set it through Culture.NumberFormat.CurrencySymbol only.

Please let us know whether the provided sample meets your requirement.

Regards,
Jessie


Attachment: NumericTextBox_117474_cb30667e.zip


RW Roger Weiss replied to Victory Jessie Selvam D November 4, 2014 03:36 PM UTC

Hi Roger,

Thank you for using Syncfusion products.

Query #1: Is there a way to get it to display consistently on the left ?
Yes, you can display the currency symbol in left by setting Culture.NumberFormat.CurrencyPositivePattern = 0. We have prepared a sample for achieving this requirement.

Query #2:is there a way to specify the Currency symbol directly?
Currently there is no support in SfNumericTextBox to specify currency symbol directly. You can set it through Culture.NumberFormat.CurrencySymbol only.

Please let us know whether the provided sample meets your requirement.

Regards,
Jessie


Attachment: NumericTextBox_117474_cb30667e.zip

Hi, thank you for your response.  The sample you posted correctly puts the currency symbol at the beginning of the control and puts a space after the symbol which is what I want.

Even with your sample, i could not change the decimal amount.

From the same sample you created and posted in the previous reply, change the method in MainPage.cs to read like this:


        public MainPage()
        {
            InitializeComponent();
            var cultureInfo = new System.Globalization.CultureInfo("en-ZA");
            cultureInfo.NumberFormat.CurrencyNegativePattern = 0;
            numeric.Culture = cultureInfo;
            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }



Now try and edit the amount and specify a decimal amount.  You will notice that the numeric control does not allow any decimal values. It does  not respond to the decimal values


VJ Victory Jessie Selvam D Syncfusion Team November 5, 2014 12:21 PM UTC

Hi Roger,

Thank you for your update.

Query: Even with your sample, i could not change the decimal amount.
For the culture "en-ZA", number decimal separator symbol is "," and number group separator symbol is ".". So typing the character '.' in NumericTextBox will not change the decimal values. We would suggest you to change the InputScope as Text and use "," as decimal separator for this culture. And we have prepared a simple sample to achieve this.

Please let us know whether the provided sample meets your requirement.

Regards,
Jessie

Attachment: NumericTextBox_117474_d7d6927f.zip


RW Roger Weiss November 5, 2014 03:16 PM UTC

Hi,

Thank you for your reply.  This is certainly an acceptable work around, but not 100% ideal because the  text keyboard is misleading for the user.  We would rather show a a numeric keyboard only.  I think this is actually a fault of Windows Phone operating system, rather than your component. Thank you for your prompt reply.


VJ Victory Jessie Selvam D Syncfusion Team November 7, 2014 01:09 PM UTC

Hi Roger,

Thank you for your update.

We are glad to provide solution for your queries.

Please let us know if you need further assistance.

Regards,
Jessie

Loader.
Live Chat Icon For mobile
Up arrow icon