customValidator with ClientValidationFunction doesn't fire when i clicked on "Next"

2 posts, 0 answers
  1. Adrien
    Adrien avatar
    9 posts
    Member since:
    Feb 2016

    Posted 07 Apr 2016 Link to this post

    Hello,

    I have a problem, the customValidator with ClientValidationFunction (Client side) doesn't fire when I go to the next step.

    If I use OnServerValidate in my CustomValidator, it's fire.

    My RadWizardStep contains a radgrid and the customvalidator.

     

    here is my code:

    VB:

     

    <telerik:RadWizardStep Title="Client" StepType="Step"  ValidationGroup="RequireClient" CausesValidation="true">
                                <asp:CustomValidator ID="cvRequireClientStep" ClientValidationFunction="validerWizardClient"
                                EnableClientScript="true" ErrorMessage="" runat="server" ValidationGroup="RequireClient"/>
                                <telerik:RadGrid ID="rgWizardWekClient" runat="server" AllowPaging="true" PageSize="20"
                                    CellSpacing="0" AutoGenerateColumns="false" AllowFilteringByColumn="True" 
                                    OnNeedDataSource="rgWizardWekClient_NeedDataSource"
                                    CssClass="radGridStyle" GridLines="None">
                                    <GroupingSettings CaseSensitive="false" /> 
                                    <ClientSettings ReorderColumnsOnClient="True">
                                        <Scrolling AllowScroll="True" SaveScrollPosition="true" 
                                            UseStaticHeaders="True" />
                                        <Selecting AllowRowSelect="True"/>
                                    </ClientSettings>
                                    <MasterTableView AllowFilteringByColumn="True" DataKeyNames="kun_kunid">
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="kun_kunnr" HeaderStyle-HorizontalAlign="Center" HeaderText="N°" UniqueName="Numero" 
                                            FilterControlWidth="80px" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" >
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="per_name1" HeaderStyle-HorizontalAlign="Center" HeaderText="Nom" UniqueName="Nom"
                                            FilterControlWidth="80px" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" >
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Adresse" HeaderStyle-HorizontalAlign="Center" HeaderText="Adresse" UniqueName="Adresse"
                                            FilterControlWidth="80px" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" >
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
     </telerik:RadWizardStep>

     

    JS:

    function validerWizardClient(sender, eventArgs){
                var rgClientWep = $find("<%= rgWizardWekClient.ClientID %>");
                var masterTableView = rgClientWep.get_masterTableView();
                var selectedItems = masterTableView.get_selectedItems();
                eventArgs.IsValid = false;
                if (selectedItems.length == 1) {
                    eventArgs.IsValid = true;
                }
            }

     

    Thanks to spend time for me :)

  2. Nencho
    Admin
    Nencho avatar
    1514 posts

    Posted 12 Apr 2016 Link to this post

    Hello Adrien,

    I have locally tested the described inability to trigger the client validation function, but the behavior was not locally replicated - the function in properly triggered.

    In the attachment you can find the simple example that was used for local tests. You can give it a try at your end and verify whether the problem still persist.

    Lastly, could you specify which version of our product are you currently using?

    Regards,
    Nencho
    Telerik
Back to Top