Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1230
Webdatagrid Validator Issue
posted

Outside Webdatagrid, I had used Required & Regularexpression validator like below to validate if year is ok. But the issue is that even when the condition is satisfied, still it displays & hence Save event in Code behind is not fired.

<ig:WebDataGrid ID="WebDataGrid1" ClientIDMode="Static" runat="server" Height="350px" Width="400px" AutoGenerateColumns="false" DataKeyFields="Id" >
   
<Columns>
       
<ig:BoundDataField DataFieldName="Id" Key="Id" Hidden="true">
        </ig:BoundDataField>

<ig:BoundDataField DataFieldName="Year" Key="CYear">
           
<Header Text="Year" />
       
</ig:BoundDataField>

        .......................

</Columns>

......

</ig:WebDataGrid>

<asp:RequiredFieldValidator Id="rfvYear" runat="server" ControlToValidate="WebDataGrid1" ErrorMessage="Please enter value" />

<asp:RegularExpressionValidator Id="reYear" runat="server" ControlToValidate="WebDataGrid1" ErrorMessage="Year:9999" />