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