Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
77 views

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value .

After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call w

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
        <telerik:RegExpTextBoxSetting BehaviorID="ProvinceCode" ValidationExpression="^\d{1-10}$" FocusedCssClass="center" HoveredCssClass="center" InvalidCssClass="center" ReadOnlyCssClass="center" EnabledCssClass="center" EmptyMessageCssClass="center" DisabledCssClass="center">
            <TargetControls>
                <telerik:TargetInput ControlID="txtProvinceCode" />
            </TargetControls>
            <Validation ValidateOnEvent="Blur" Method="Find" Location="../../Services/ProvinceService.asmx" ValidationGroup="vgProvince" />
            <ClientEvents OnValidating="RequireProvinceCode"></ClientEvents>
        </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    <div>
        <label>ProvinceCode</label>
        <asp:TextBox ID="txtProvinceCode" runat="server"></asp:TextBox>
 
    </div>
 
    <div>
        <telerik:RadButton ID="btnSave" runat="server" Text="Save" AutoPostBack="False" ></telerik:RadButton>
    </div>
</form>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script>
 
        function RequireProvinceCode(sender, args) {
            var inputManager = $find("<%= RadInputManager1.ClientID %>");
            var input = inputManager.get_targetInput("<%= txtProvinceCode.ClientID %>");
            var val = Number(input.get_value());
            console.log(val);
 
            //args.IsValid = false;
            //return false;
        }
 
    </script>
</telerik:RadCodeBlock>
eb service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:

I have RadInoutManager for validation in my page . one of them validate from web service and works good but i want to cancel remote validation in TextBox is empty ! I have no problme with validation RadInputManager , just if TextBox is empty so validation for call web service will be canceled until TextBox has a value . After search i find OnValidating event . that resaid before client and server side validation in RadInputManger so i can write code here but not working and i can't cancel call web service . I can check value od TextBox in OnValidating event but i can't cancel remote validation . please help me .

<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:
Viktor Tachev
Telerik team
 answered on 29 Aug 2016
0 answers
144 views

Hi Telerik

I  want to customize ErrorMessage and EmptyMessage for each controls but when set ErrorMessage , that apply for all controls in <TargetControls > .

1) How can i customize for each controls ?

2) I want to after validate the message errors apear in ValidationSummary and ErrorMessage not show in controls !

3) How can i hise ErrorMessage after validating in control ?

please help me 

Thanks.

<telerik:RadInputManager ID="RadInputManager1"  runat="server">       
        <telerik:RegExpTextBoxSetting BehaviorID="Setting3"  EmptyMessage="..... how can customize this message for any controls ..." 
            ErrorMessage="..... how can customize this message for any controls ..." Validation-IsRequired="true" Validation-ValidationGroup="Search">
                <TargetControls >
                    <telerik:TargetInput ControlID="txtFirstName"  />
                    <telerik:TargetInput ControlID="txtLastName"  />
                    <telerik:TargetInput ControlID="txtEmail"  />
                    <telerik:TargetInput ControlID="txtZipCode"  />
                </TargetControls>
            </telerik:RegExpTextBoxSetting
    </telerik:RadInputManager>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

حمید
Top achievements
Rank 1
 asked on 31 May 2016
1 answer
48 views

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

Maria Ilieva
Telerik team
 answered on 15 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?