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

Radnumeric text box issue

1 Answer 68 Views
Input
This is a migrated thread and some comments may be shown as answers.
nagendra
Top achievements
Rank 1
nagendra asked on 24 Dec 2010, 09:50 AM
Hi,

I am using radnumeric text box in currency formate. How can configure textbox to appear the negative value as shown in screen shot.
RadNumericTextBox txtCostBasis = dataItem.FindControl("txtCostBasis") as RadNumericTextBox;
                       txtCostBasis.Type = NumericType.Currency;
                       txtCostBasis.NumberFormat.DecimalDigits = 2;
                       txtCostBasis.NumberFormat.DecimalSeparator = ".";
                       txtCostBasis.NumberFormat.GroupSeparator = ",";
                       txtCostBasis.NumberFormat.GroupSizes = 3;
                       txtCostBasis.NumberFormat.NegativePattern = "$ -n";
                       txtCostBasis.NumberFormat.PositivePattern = "$ n";
                       txtCostBasis.Culture = new CultureInfo("en-US");

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Dec 2010, 11:32 AM
Hello Nagendra,

Please try the following code:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server">
    <NumberFormat NegativePattern="- $n" PositivePattern="$n" />
</telerik:RadNumericTextBox>

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Input
Asked by
nagendra
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or