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" />
Hello Aujla,
The WebDataGrid has support to allow you to use various ASP.NET validator controls when editing the grid's cells. We have created this YouTube video which demonstrates how to set up different validators such as the RequiredFieldValidator and a CustomValidator in the grid.
Go through the video and let me know if you still need further assistance.
Thanks for replying. My issue is webdatagrid required validator displays message even when Year text is filled. Message is not removed and hence code behind Save event is not fired.
Thank you for the update.
1) Would like to know which version of Infragistics controls you are using?
2) Which browser you are using?
Do you have a small isolated running sample that you can send so I can see the issue first hand?
Or find the attached sample of WebdataGrid I would like you to modify the sample with your scenario and help me to have clear understanding of issue. I have created the sample with latest version (16.1) you can modify the sample with your version and build.
Looking forward to hearing from you.