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
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
Another issue now is, after page load ValueChanged event is fired automatically for the textbox.
Please suggest.
Thanks,
Jono
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
Thanks
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
Thank you for reply.Surely we will move to MaskedInput control but currently by using converter we have fixed null issue.
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 .
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
>
⁠
<!--Unicode Character 'WORD JOINER'' (U+2060)-->
</
telerik:RadMaskedNumericInput.Placeholder
>
Regards,
Tsvetie
Telerik