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

Keep Leading Zeros

3 Answers 580 Views
Input
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 29 Jun 2010, 09:47 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 30 Jun 2010, 07:50 AM
Hi Chris,

Have you tried RadMaskedTextBox instead?

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



-Shinu.
0
Izak Joubert
Top achievements
Rank 1
answered on 15 Aug 2011, 09:14 PM
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.
0
Shinu
Top achievements
Rank 2
answered on 16 Aug 2011, 06:16 AM
Hello Izak,

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

Thanks,
Shinu.
Tags
Input
Asked by
Chris
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Izak Joubert
Top achievements
Rank 1
Share this question
or