7 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 30 Sep 2010, 08:41 AM
Hello,
Try the following Mask/DisplayMask properties to achieve this.
Documentation on Masks:
http://www.telerik.com/help/aspnet-ajax/input_radmaskedtextboxmasks.html
-Shinu.
Try the following Mask/DisplayMask properties to achieve this.
<
telerik:RadMaskedTextBox
ID
=
"RadMaskedTextBox2"
runat
=
"server"
Mask="<-999..999>"
DisplayMask="<-999..999>">
</
telerik:RadMaskedTextBox
>
Documentation on Masks:
http://www.telerik.com/help/aspnet-ajax/input_radmaskedtextboxmasks.html
-Shinu.
0

Ferdinand
Top achievements
Rank 1
answered on 30 Sep 2010, 08:53 AM
Hi,
thanks for the reply. I already tried that but all that is shown is 0000 (for <-999..999>) and it is not possible to set a "-" for the first "0". This always remains "0" (whatever you enter).
So, any other ideas?
thanks for the reply. I already tried that but all that is shown is 0000 (for <-999..999>) and it is not possible to set a "-" for the first "0". This always remains "0" (whatever you enter).
So, any other ideas?
0

Cori
Top achievements
Rank 2
answered on 30 Sep 2010, 04:42 PM
Hello Ferdinand,
Why can't you use a RadNumericTextBox for your situation? All you would need to do is set MinValue="-999" and MaxValue="999". Is that not what you want it to do?
Why can't you use a RadNumericTextBox for your situation? All you would need to do is set MinValue="-999" and MaxValue="999". Is that not what you want it to do?
0

Dominik Gierse
Top achievements
Rank 1
answered on 01 Oct 2010, 07:17 AM
Hi.
Ferdinand is on vacation and I try to resolve this problem now...
I have to use the same TextBox as time input. With the masked TextBox I only have to change the mask and I can reuse it.
Best regards.
Ferdinand is on vacation and I try to resolve this problem now...
I have to use the same TextBox as time input. With the masked TextBox I only have to change the mask and I can reuse it.
Best regards.
0

Cori
Top achievements
Rank 2
answered on 01 Oct 2010, 02:40 PM
Hello Uwe,
This is a very strange issue and it seems to be an issue with the control itself. The only way I was able to get it to display the negative sign was doing the following steps:
1. Entered "-999". It shows "0999".
2. I moved to the right of the first 0 and pressed BACKSPACE and then entered "-". It then showed "-999".
I believe this is some sort of bug with the RadMaskedTextBox or its inability to do negative to positive number ranges.
This is a very strange issue and it seems to be an issue with the control itself. The only way I was able to get it to display the negative sign was doing the following steps:
1. Entered "-999". It shows "0999".
2. I moved to the right of the first 0 and pressed BACKSPACE and then entered "-". It then showed "-999".
I believe this is some sort of bug with the RadMaskedTextBox or its inability to do negative to positive number ranges.
0

Cori
Top achievements
Rank 2
answered on 01 Oct 2010, 02:56 PM
Hello Uwe,
This is the only mask that I can see working for your situation. Although it has some faults, like if they click SPACE, it will automatically enter the negative sign, but otherwise if they just type in the number it will work correctly. It will not add that extra "0".
I hope that helps.
This is the only mask that I can see working for your situation. Although it has some faults, like if they click SPACE, it will automatically enter the negative sign, but otherwise if they just type in the number it will work correctly. It will not add that extra "0".
<
telerik:RadMaskedTextBox
ID
=
"RadMaskedTextBox1"
runat
=
"server"
DisplayMask="<-|#><
0..999
>"
Mask="<-|#><
0..999
>" Width="125px" AllowEmptyEnumerations="True">
</
telerik:RadMaskedTextBox
>
I hope that helps.
0

Dominik Gierse
Top achievements
Rank 1
answered on 01 Oct 2010, 03:20 PM
Thanks Cori,
I think that should do.
Uwe
I think that should do.
Uwe