RadInputManager MaskedTextBoxSetting full of bugs

8 posts, 0 answers
  1. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 18 Apr 2013 Link to this post

    I've already submitted cases regarding the following bugs, but I'm posting this so that the community is aware of a multitude of issues with the RadInputManager's MaskedTextBoxSetting. This aspect of the RadInputManager was clearly not ready for release, and needs to be addressed immediately.

    1. RadInputManager MaskedTextBoxSetting Fails to Persist Data if TargetInput is never focused

    RadInputManager's MaskedTextBoxSetting fails to persist data (TextBox.Text) to a postback if the TargetInput is never focused.  If you set the TargetInput's value at design time, populate it in code-behind, or bind it via a data source, then submit the page without ever focusing the target control, the value does not persist to postback.

    HTML:
    <asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
    <rad:RadInputManager ID="ram" runat="server">
        <rad:MaskedTextBoxSetting BehaviorID="phone" Mask="(###) ###-####">
            <TargetControls>
                <rad:TargetInput ControlID="txtPhone" />
            </TargetControls>
        </rad:MaskedTextBoxSetting>
    </rad:RadInputManager>
    <asp:TextBox ID="txtPhone" runat="server" Text="1234567890" />
    <asp:Button ID="btn" runat="server" Text="Submit" />

    VB.Net
    Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click
     
        Dim phone As String = txtPhone.Text
     
    End Sub

    2. RadInputManager SelectionOnFocus="None" does not work in IE

    No matter where in the textbox you place the cursor, it moves the caret to the beginning.
    Link to Feedback Portal

    3. Number pad does not input text into RadInputManager with MaskedTextBoxSetting

    When setting a MaskedTextBoxSetting, RadInputManager prevents numeric values to be entered from the keyboard's number pad into the extended text box.
    Link to Feedback Portal

    4. Highlighting the mask of a textbox with a RadInputManager MaskedTextBoxSetting prevents text entry

    When setting a MaskedTextBoxSetting and the mask in the extended text box is highlighted, RadInputManager prevents any value from being entered.
    Link to Feedback Portal
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 22 Apr 2013 Link to this post

    Hi Andy,

    The MaskedTextBoxSetting is quite new, from this release, and indeed it has some issues, that was not known before it was tested in real live scenarios.
    First one is already fixed, and will be working correct for the next release. We will try to fix the rest of the issues too.

    Greetings,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 22 Apr 2013 Link to this post

    I'm aware that it's a new control, but that doesn't excuse the complete lack of testing on your part. This, along with your complete screw up of the RadButton's onclick event in the Q1 2013 release has made me very disillusioned with your testing abilities. I think you're expending far too little time testing your controls prior to release, and then expecting your customers to pick up the slack and do all of your testing for you. It should be embarrassing to you that you have so many bug cases open right now. At the time I'm writing this, you have 358 bugs open in your Public Issue Tracker, and another 152 open in the Ideas & Feedback portal. That's inexcusable. 
  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 25 Apr 2013 Link to this post

    Hi Andy,

    Thank you for your feedback. We are working to as many bugs as we can for the next release, as well as developing the new features requested in the feed portal. We have hundreds of automated tests per control to cover back-end functionality, JS, and appearance, run them in each browser, and we also test each feature manually before releasing. I know nothing excuse us for missing some problems, but we are doing all possible to fix it as soon as they are found.

    For fixing the persisting of the value without focusing, you can place this JS in your page after the declaration of your ScriptManager:
    Telerik.Web.UI.RadMaskedTextBox.prototype.updateHiddenValue = function ()
    {
        var valueIsChanged = this._setHiddenValue(this.get_valueWithPromptAndLiterals());
        this.updateClientState();
        return valueIsChanged;
    }

    Regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 25 Apr 2013 Link to this post

    Adding that javascript to the page after the ScriptMaster declaration did not solve the problem. Try this example. 

    <asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
     
    <script type="text/javascript">
        Telerik.Web.UI.RadMaskedTextBox.prototype.updateHiddenValue = function() {
            var valueIsChanged = this._setHiddenValue(this.get_valueWithPromptAndLiterals());
            this.updateClientState();
            return valueIsChanged;
        }
    </script>
     
    <telerik:RadListView ID="rlv" runat="server" ItemPlaceholderID="ph">
        <LayoutTemplate>
            <asp:PlaceHolder ID="ph" runat="server" />
        </LayoutTemplate>
        <ItemTemplate>
            <telerik:RadInputManager ID="ram" runat="server">
                <telerik:MaskedTextBoxSetting BehaviorID="phone" Mask="(###) ###-####">
                    <TargetControls>
                        <telerik:TargetInput ControlID="txtPhone" />
                    </TargetControls>
                </telerik:MaskedTextBoxSetting>
            </telerik:RadInputManager>
            <asp:TextBox ID="txtPhone" runat="server" Text='<%#Eval("Phone")%>' />
            <asp:Button ID="btn" runat="server" Text="Submit" CommandName="Update" />
        </ItemTemplate>
    </telerik:RadListView>

    Partial Class test
        Inherits System.Web.UI.Page
     
        Protected Sub rlv_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewCommandEventArgs) Handles rlv.ItemCommand
            If e.CommandName = RadListView.UpdateCommandName Then
                Dim phone As String = DirectCast(e.ListViewItem.FindControl("txtPhone"), TextBox).Text
            End If
        End Sub
     
        Protected Sub rlv_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewNeedDataSourceEventArgs) Handles rlv.NeedDataSource
            rlv.DataSource = New PhoneNumber() {New PhoneNumber()}
        End Sub
     
    End Class
     
    Class PhoneNumber
        Public ReadOnly Property Phone() As Long
            Get
                Return 1234567890
            End Get
        End Property
    End Class

  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 30 Apr 2013 Link to this post

    Hi Andy,

    I tested exact your code (without the fix), and it appears to persist the value correct on post-back. This is working if your ListView has only one item. You may experience problems if there is more items, and this would be because you need to place the InputManager outside the ListView. Only 1 instance of InputManager should be inside your page.

    Kind regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Andy
    Andy avatar
    27 posts
    Member since:
    May 2011

    Posted 30 Apr 2013 Link to this post

    I've recorded a video to show you that the value does not persist. While the text stays in the TextBox on the client, it does not persist to the server on the first postback.  This happens regardless of whether the RadInputManager is inside or outside of the ListViewItem(s), and with or without the javascript code you provided.

    http://screencast.com/t/KvrNhnUH7vhd

    I'd have attached a sample project, but apparently you don't allow that anymore in your forums. I'm using 2013.1.423.35 and Google Chrome in the video.
  9. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 03 May 2013 Link to this post

    Hello Andy,

    Please excuse me for my mistake, indeed the problem exist. For reporting it we are updating your Telerik Points. This issue will be fixed for our upcoming release, but currently there is not workaround for it.

    Regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017