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

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

1 Answer 241 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Adrien
Top achievements
Rank 1
Adrien asked on 07 Apr 2016, 08:06 AM

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 :)

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 12 Apr 2016, 07:07 AM
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
Tags
Wizard
Asked by
Adrien
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or