default value

3 posts, 0 answers
  1. Kjell
    Kjell avatar
    195 posts
    Member since:
    May 2011

    Posted 15 Sep Link to this post

    I use EditItemTemplate and RadNumericTextBox.

    How set default value to 100 into the RadNumericTextBox if the user does not fill in the value?


    <telerik:GridTemplateColumn UniqueName="sortid" SortExpression="sortid" HeaderText="Sortering" EditFormHeaderTextFormat="" HeaderStyle-Width="100px">
            <asp:Label ID="lblSortid" Text='<%# Eval("sortid") %>' runat="server" />
            <telerik:RadNumericTextBox ID="tbSortid" Width="100px" MaxLength="3" Text='<%# Bind("sortid") %>' EmptyMessage="Sortering (100)" ToolTip="Sortering" runat="server">
                <NumberFormat DecimalDigits="0" GroupSeparator="" />
                ErrorMessage="Sortering (100)?"
                runat="server" />

  2. Phil H.
    Phil H. avatar
    81 posts
    Member since:
    Nov 2008

    Posted 15 Sep in reply to Kjell Link to this post


    Try onblur clientside event.  If the sender (RadNumericTextbox) get_value() is empty then set it.


  3. DevCraft R3 2016 release webinar banner
  4. Viktor Tachev
    Viktor Tachev avatar
    1444 posts

    Posted 19 Sep Link to this post


    If you would like to specify a default value that will be inserted by default for the field you can use the DefaultInsertValue property for the column.

    Viktor Tachev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top