How to set initial/default value for RadNumericTextbox?

2 posts, 0 answers
  1. JD.
    JD. avatar
    37 posts
    Member since:
    Aug 2012

    Posted 17 Jun 2012 Link to this post


    After I added DbValue property, the default/initial value "0"  disappears.  
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"
    CssClass="AlignRight" Culture="en-US"
    Value="0" DataType="System.Decimal"
    DbValue ='<%# Bind( "RateValue") %>'
    LabelWidth="64px" Width="160px">
    <NumberFormat ZeroPattern="n"></NumberFormat>
    <DisabledStyle HorizontalAlign="Right" />

  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 19 Jun 2012 Link to this post

    Hello J,

    The described behaviour is expected since, you're passing it a null value, which the control accepts. I would suggest handling the client-side load event and set the default value accordingly. Like so:

    function OnLoad(sender, args) {
        if (sender.isEmpty()) {

    I hope that helps.
  3. DevCraft R3 2016 release webinar banner
Back to Top