RadNumericTextBox number format issue

4 posts, 0 answers
  1. Ramesh kumar Kuppusamy
    Ramesh kumar Kuppusamy avatar
    36 posts
    Member since:
    Apr 2010

    Posted 02 Feb 2011 Link to this post

    Hi

    I am having the following issue in RadNumericTextBox which has been placed inside the RadGrid Template column.

    1. In SQL my data would be like the following
       
    Range
    12.12457234
    585
    23.01
    0
    1112.792345

    When I bind the data to my RadGrid, the RadNumericTextBox by default it takes the decimal point, that is for the second row in the RadGrid the data was binded as 585.00 insted of 585.

    Our requirement is to display the exact value which are stored in SQL.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 02 Feb 2011 Link to this post

    Hi,

    To specify the number of digits that are displayed after the decimal separator you could set DecimalDigits property:
    ASPX:
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" NumberFormat-DecimalDigits="0">
    </telerik:RadNumericTextBox>

    More information about formatting numeric values is available here:
    http://www.telerik.com/help/aspnet-ajax/input_radnumerictextboxformatting.html

    Best wishes,
    Pavlina
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 16 Jul 2011 Link to this post

    Ola,

    And how do we do that in code (dynamicly)?
    there the NumberFormat.NumberDecimalDigits is readonly and via the culture an error is thrown..

    Eirk
  5. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 16 Jul 2011 Link to this post

    ow, sorry. via de culture the property is called 'NumberDecimalDigits', but in numberformat plain the property is 'DecimalDigits', what is working fine.
Back to Top