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

RadMaskedTextBox.set_value() doesn't update

4 Answers 73 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 13 Jun 2015, 01:59 AM

Team Telerik,

I've encountered what appears to be a bug with the RadMaskedTextBox.set_value() method in ASPNet UI 2015.1.401.45

When called, the RadMaskedTextbox doesn't reflect the new value until you mouse click into the field.

Work Around:

Call RadMaskedTextbox.focus() immediately after RadMaskedTextbox.set_value(). It's a little tacky, but it works.

Can you guys fix this for 2015 Q2? That'd be great. Thanks.

- Jonathan

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 17 Jun 2015, 09:05 AM
Hi Jonathan,

I have tested the described scenario with version 2015.1 401, but everything seems to work correctly on my end with the following example:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function changeValue(sender, args) {
            var maskedTextBox1 = $find("<%=RadMaskedTextBox1.ClientID%>");
            maskedTextBox1.set_value("111333");
            var maskedTextBox2 = $find("<%=RadMaskedTextBox2.ClientID%>");
            maskedTextBox2.set_value("test");
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadMaskedTextBox runat="server" ID="RadMaskedTextBox1" Mask="###-###"></telerik:RadMaskedTextBox>
<telerik:RadMaskedTextBox runat="server" ID="RadMaskedTextBox2" Mask="Llll"></telerik:RadMaskedTextBox>
 
<telerik:RadButton runat="server" ID="RadButton1" AutoPostBack="false" Text="Test button" OnClientClicked="changeValue"></telerik:RadButton>

Can you please modify the above, so it could replicate the problem that you are facing?

I am looking forward to your reply.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Matt
Top achievements
Rank 1
answered on 12 Jul 2018, 08:04 PM
I have Q2 2015 and it still doesn't update but then I can't get the focus trick to work either...
0
Matt
Top achievements
Rank 1
answered on 12 Jul 2018, 09:00 PM
.... which means trip back to the server to get these fields to be empty ....
0
Peter Milchev
Telerik team
answered on 17 Jul 2018, 01:37 PM
Hello Matt,

We have tested the code snippet provided from Konstantin and it works as expected with the latest version of the Telerik controls and the Q2 2015 release. Here is how the provided code works when the masked textboxes are with RenderMode Lightweight and the Telerik version is Q2 2015.



If this behavior is observed only in Internet Explorer and not all browsers, please confirm that the Compatibility Mode is disabled as explained in Different appearance or behavior in Internet Explorer on local and production servers.

If that is not what you are aiming for, please open an official support thread where you can attach a runnable project replicating the issue along with more details on the current and expected behavior and some screenshots/screencast of the behavior.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MaskedTextBox
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Matt
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or