Keep Leading Zeros

4 posts, 1 answers
  1. Chris
    Chris avatar
    13 posts
    Member since:
    Jun 2010

    Posted 29 Jun 2010 Link to this post

    Hi,
    I am using a RadNumericTextBox with DataType="System.Int32" and I would like it to keep any leading zeros after losing focus.  Is there a simple way to do this, and if so, how?

    Thanks,
    Chris
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jun 2010 Link to this post

    Hi Chris,

    Have you tried RadMaskedTextBox instead?

    Here is a sample:
     
        <telerik:RadMaskedTextBox Mask="##########" PromptChar=" " ID="RadMaskedTextBox2" 
            runat="server"
        </telerik:RadMaskedTextBox> 



    -Shinu.
  3. Izak Joubert
    Izak Joubert avatar
    5 posts
    Member since:
    Jul 2012

    Posted 15 Aug 2011 Link to this post

    Hi shinu,

    Is there any other way to handle leading zeros. I am using radnumerictextbox. I cannot use radmaskedtextbox as I don't know the length of the number. I am using it for accepting account numbers which can have 0's in the beginning. The length of account number is not specific.

    Thanks.
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Aug 2011 Link to this post

    Hello Izak,

    Check the following forum which explains more about your requirement.Hope this helps.
    Zero in front

    Thanks,
    Shinu.
Back to Top