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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is it possible to use negative value in ejCurrencyTextbox?

Thread ID:

Created:

Updated:

Platform:

Replies:

142102 Jan 18,2019 07:40 PM UTC Jan 22,2019 12:15 PM UTC JavaScript - EJ 2 3
loading
Tags: NumericTextBox
Yukiko Imazu
Asked On January 18, 2019 07:40 PM UTC

Hi,

I'm trying to use ejCurrencyTextbox in ASP.Net webform custom dialog.
What our requirement is for user to enter negative value in ejCurrencyTextbox.
It seems like we can't enter negative value in ejCurrencyTextbox.  Is it possible to do that?

I've attached sample solution for custom dialog.

Thanks.
Yukiko

Attachment: test_b85deb6c.7z

Christopher Issac Sunder K [Syncfusion]
Replied On January 21, 2019 12:27 PM UTC

Hi Yukiko, 

Thank you for contacting Syncfusion support. 

We have analyzed your query and provided sample at our end. For your provided sample, we were unable to find which place you have rendered the ejCurrencyTextbox component in your application. In our currency text box, minimum value is 0 by default. So, to set the negative value please change the minValue of element. Please refer the below code snippet 

$("#currency").ejCurrencyTextbox({ 
name: "currency", 
value: 555, 
minValue: -100, 
}); 

Still you are facing the same, please provide more details about your requirement. This would be more helpful to identify your problem easily. 

Thanks, 
Christo 


Yukiko Imazu
Replied On January 21, 2019 03:23 PM UTC

Hi Christo,

Thank you for replying.
I achieved our requirement with setting minValue in ejCurrencyTextbox.

I have one more question.  When it's negative value, it shows with parentheses like ($25).
Is it possible to change the appearance like -$25?

Thanks,
Yukiko



Christopher Issac Sunder K [Syncfusion]
Replied On January 22, 2019 12:15 PM UTC

Hi Yukiko, 

Thank you for contacting Syncfusion support. 

In our ejCurrencyTextbox, we have provided NegativePattern property to specify the pattern format for currency textbox value. You can use this property to format the ejCurrencyTextbox value as per your requirement. Please check the below code block. 

<ej:CurrencyTextBox id="currency" MinValue="-100" NegativePattern="-$n" Value="555" Name="currency" runat="server" Locale="en-US"></ej:CurrencyTextBox> 

We have prepared a sample for your reference. 


Please check it and let us know if you have any concerns. 

Thanks, 
Christo 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;