Lakshmitha
Lakshmitha

Reputation: 103

How to display Decimal value in <telerik:radnumerictextbox> control?

I am using telerik:radnumerictextbox control for giving decimal input, I need to give input in decimal like 10, but radnumerictextbox displays value by default 10.00, how to set the property to get decimal value.

This is the code i am using in client side.

<telerik:radnumerictextbox 
        ID="txtDirectTime" 
        ShowSpinButtons="True" 
        InterceptArrowKeys="True" 
        Step="5" MinValue="0" runat="server">  

Thanks in advance.

Upvotes: 4

Views: 10310

Answers (3)

user2811174
user2811174

Reputation: 21

NumberFormat-GroupSeparator="" works perfectly fine.

Upvotes: 2

JohnC
JohnC

Reputation: 1917

In answer to your supplemental question, "how to remove ',' [thousands separator]?".

Use the NumberFormat GroupSeparator property, either as an attribute on the control tag:

<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"
    NumberFormat-GroupSeparator="" />

or as a child element:

<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server">
    <NumberFormat GroupSeparator="" />
</telerik:RadNumericTextBox>

Reference: RadNumericTextBox Formatting Numeric Values (Telerik)

Upvotes: 1

yogi
yogi

Reputation: 19591

Try this

<telerik:RadNumericTextBox runat="server"
                           ID="YourTextBox"
                           NumberFormat-DecimalDigits="2" />

For more on RadNumericTextBox visit here.

Upvotes: 5

Related Questions