RadInputManager et MaskedTexboxSetting

2 posts, 0 answers
  1. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 13 Oct 2015 Link to this post

    Hello,

     

    When i getting the value of the Asp TextBox mapped with radinputmanager like this

     <telerik:MaskedTextBoxSetting Mask="##.##.##.##.## lllll" SelectionOnFocus="CaretToBeginning">
                <TargetControls>
                    <telerik:TargetInput ControlID="txt_phone" />
                </TargetControls>
            </telerik:MaskedTextBoxSetting>

    If i get the value : this.txt_phone.Text , i get the mask inside.

    When i used just radmasked textbox , i don't get the mask only the data.

    thanks for your help

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Oct 2015 Link to this post

    Hello Olivier,

    Try assessing the value like this:

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function pageLoad()
            {
                var inputManager = $find("<%= RadInputManager1.ClientID %>");
                var input = inputManager.get_targetInput("<%= txt_phone.ClientID %>");
                var value = input.get_value();
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
         <telerik:MaskedTextBoxSetting Mask="##.##.##.##.## lllll" SelectionOnFocus="CaretToBeginning">
                <TargetControls>
                    <telerik:TargetInput ControlID="txt_phone" />
                </TargetControls>
            </telerik:MaskedTextBoxSetting>
    </telerik:RadInputManager>
     and see how it goes.

    Regards,
    Maria Ilieva
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top