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

RadNumericTextBox number format issue

3 Answers 519 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramesh kumar Kuppusamy
Top achievements
Rank 1
Ramesh kumar Kuppusamy asked on 02 Feb 2011, 10:35 AM
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.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 02 Feb 2011, 05:07 PM
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.
0
Erik
Top achievements
Rank 2
answered on 16 Jul 2011, 07:48 PM
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
0
Erik
Top achievements
Rank 2
answered on 16 Jul 2011, 07:51 PM
ow, sorry. via de culture the property is called 'NumberDecimalDigits', but in numberformat plain the property is 'DecimalDigits', what is working fine.
Tags
General Discussions
Asked by
Ramesh kumar Kuppusamy
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Erik
Top achievements
Rank 2
Share this question
or