Radnumeric text box issue

2 posts, 0 answers
  1. nagendra
    nagendra avatar
    34 posts
    Member since:
    Jan 2009

    Posted 24 Dec 2010 Link to this post

    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");
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 24 Dec 2010 Link to this post

    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.
Back to Top