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

RadMaskedTextBox incorrectly hiding the value on ASYNC Postback

4 Answers 88 Views
Input
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 15 Jun 2011, 02:18 PM
I have a masked text box inside an update panel.  The masked text box has hideonblur set to true, and uses an empty message.  When the page loads, the masked text box displays the empty message correctly.  When I type a value in the masked text box, the empty message is correctly hidden.

I then click a button.  The click event of this button is a trigger on the update panel that contains my masked text box.  The page is asynchronously posted back, and when it finishes, the masked text box now displays the empty message instead of the value that was entered!  If you click in the masked text box to give it focus, then tab out, the empty message is now hidden, and the value again displayed.

How can I keep my masked text box inside the update panel and not have it incorrectly hide my value?  The only solution I've found is to remove the empty message AND hideonblur, which causes the mask to always display, which is not what I want.

I am using the standard MS AJAX panels.  Any help is appreciated.

4 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 16 Jun 2011, 11:41 AM
Hello Karl,

We had been reported similar issue that was fixed in the Q1 2011 SP2 release (2011.1.519). Could you please verify whether the problem can be reproduced this version of the controls?

Kind regards,
Martin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Karl
Top achievements
Rank 1
answered on 16 Jun 2011, 01:52 PM
Martin,

I was using version 2011.1.413.35.  I have upgraded to the latest version, and am now experiencing a different problem:

Here is the code for my masked text box:

<telerik:RadMaskedTextBox ID="myMask" runat="server" EnableEmbeddedSkins="False" Skin="HR" Mask="##:## <AM|PM>" HideOnBlur="True" Width="96px" EmptyMessage="00:00 AM or PM" SelectionOnFocus="SelectAll"></telerik:RadMaskedTextBox>

In the prior version, this code was behaving as described above.  In the new version, the control doesn't correctly display the empty message when the page loads, rather, it shows the mask "__:__ AM."  The literals in the mask seem to be causing it to incorrectly deem the control as containing a value, thus displaying the mask rather than the empty message.

So I am not able to test if the new version correctly stops the issue I was having, as the control isn't correctly hiding on blur to begin with.

Any suggestions?
0
Accepted
Martin
Telerik team
answered on 17 Jun 2011, 03:01 PM
Hello Karl,

Please note that in releases Q1 2011 SP2 (2011.1.519) and later when enumeration mask parts are used in the mask, the empty message will not be shown unless AllowEmptyEnumerations is set to true:

<telerik:RadMaskedTextBox ID="myMask" runat="server" EnableEmbeddedSkins="False" AllowEmptyEnumerations="true"
    Skin="HR" Mask="##:## <AM|PM>" HideOnBlur="True" Width="96px" EmptyMessage="00:00 AM or PM"
    SelectionOnFocus="SelectAll">
</telerik:RadMaskedTextBox>

I hope this helps.

Kind regards,
Martin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Karl
Top achievements
Rank 1
answered on 17 Jun 2011, 03:09 PM
Martin,

That did the trick.  The initial problem, and the problem caused by the upgrade are both solved.  Thank you for your help.

Karl
Tags
Input
Asked by
Karl
Top achievements
Rank 1
Answers by
Martin
Telerik team
Karl
Top achievements
Rank 1
Share this question
or