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

radmaskedtextbox mask number with space

8 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 26 Nov 2010, 06:29 AM
Hi,

I am trying to display a nine digit number with space after each 3 digits. So, I added this

<

 

 

telerik:RadMaskedTextBox Value="{Binding ACN, Mode=TwoWay}" UpdateValueEvent="LostFocus" Margin="2" Name="txtACN" IsEnabled="True" MaskType="Standard" Mask="### ### ###" EmptyContent="Enter ACN\ARSN here" ValueChanged="TxtAcnValueChanged" />

 


I added ValueChanged event handler because I wanna set a flag internally that certain field changed in the page, like

    _stringBuilder.Append(

 

" ACN,");

Now the problem is, after page load textbox remains blank untill I click on it. Once click value gets display but unneccessarily ValueChanged event fires.
The data column which binds to the control is of type int.

Please help,
Jono

 

8 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 26 Nov 2010, 11:00 AM
Hi Jonathan,

 The value not appearing is because of the UpdateValueEvent property being set to LostFocus. This is a known issue for us and currently, to get around this, you can use the code snippet provided here. Please note that we are currently refactoring the plumbing code of the RadMaskedTextBox. We have already covered the LostFocus issue and we will support inserting regular text inside the mask (as in your case "ACN,") - you will be able to add this to the mask directly without handling the ValueChanged event. The complete refactoring is due the upcoming Q.

Regards,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Jonathan
Top achievements
Rank 1
answered on 29 Nov 2010, 02:16 AM
Thanks very much Alex.

Another issue now is, after page load ValueChanged event is fired automatically for the textbox.
Please suggest.

Thanks,
 Jono
0
Alex Fidanov
Telerik team
answered on 29 Nov 2010, 06:35 PM
Hello Jonathan,

Have you tried subscribing to the event in the RadMaskedTextBox's Loaded event, or dispatching (Dispatchet.BeginInvoke() ) the code that subscribes to it? This should give enough time in order not to catch the first raising of this event.

Sincerely yours,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Princee
Top achievements
Rank 1
answered on 30 Apr 2014, 07:33 AM
I am new to telerik controls .My question is related to RadMaskedTextBox .I am using this control with MaskType ="Numeric" and Mask ="d" and Value binding .My problem is when I am entering value then no issue but while removing if there is no content in the box then its a problem .Why this control is not taking null value.Please reply as soon as possible.


Thanks 
0
Petar Mladenov
Telerik team
answered on 30 Apr 2014, 12:08 PM
Hello Medha,

RadMaskedTextBox is Obsolete control and will be deleted in Q2 2014 Release. Furthermore it does not support properly null values. For this purpose we highly encourage you to use our RadMaskedNumericInput. Please check out this help article describing the upgrading steps you can follow.

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Princee
Top achievements
Rank 1
answered on 30 Apr 2014, 01:01 PM
Hi Petar,
              Thank you for reply.Surely we will move to MaskedInput control but currently by using converter we have fixed null issue.
0
Princee
Top achievements
Rank 1
answered on 02 May 2014, 06:04 AM
Hi Petar,
              I have moved to RadMaskedTextInput control but there are some issues . If there is no data in control its showing filter button with cross mark and If  I have removed typed data , underscore sign is appearing with message enter a value .How to use this control with only numeric data without any underscore sign and messages.

Please let me know if I am missing anything .



    
0
Tsvetie
Telerik team
answered on 05 May 2014, 11:53 AM
Hi Medha,

You can use the IsClearButtonVisible property of the RadMaskedNumericInput control to show/hide the clear button. For example:

<telerik:RadMaskedNumericInput IsClearButtonVisible="False"

Regarding removing the placeholder symbol, you can use one of the suggestions in this forum post, or set a char that suits your needs using the Placeholder property. For example:

<telerik:RadMaskedNumericInput.Placeholder>
    &#x2060;
    <!--Unicode Character 'WORD JOINER'' (U+2060)-->
</telerik:RadMaskedNumericInput.Placeholder>

Regards,
Tsvetie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Jonathan
Top achievements
Rank 1
Princee
Top achievements
Rank 1
Petar Mladenov
Telerik team
Tsvetie
Telerik team
Share this question
or