I have a RequiredFieldValidator:
<asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ErrorMessage="Required" ControlToValidate="grid" CssClass="Validate"></asp:RequiredFieldValidator>
I have selected the validator on four different columns, but it only seems to work on the column that is using the TextBoxProvider.
<ig:CellEditing><ColumnSettings><ig:EditingColumnSetting ColumnKey="DOS" EditorID="grid_DatePickerProvider" ValidatorID="RequiredFieldValidator" /><ig:EditingColumnSetting ColumnKey="BMI" ValidatorID="RequiredFieldValidator" EditorID="grid_NumericEditorProvider_Decimal2" /><ig:EditingColumnSetting ColumnKey="Weight_in_Lbs" ValidatorID="RequiredFieldValidator" EditorID="grid_NumericEditorProvider_Decimal1" /><ig:EditingColumnSetting ColumnKey="Comment" ValidatorID="RequiredFieldValidator" EditorID="grid_TextBoxProvider" /></ColumnSettings></ig:CellEditing>
Any ideas why it might not be working?
Hi Angela,
I just tested the RequiredFieldValidator with Date column using DatePickerProvider and the validation is working fine.
I'll attach my sample to this post so you could take a look at my implementation. If you still have issues with the validator you could open a support case and attach a working sample demonstrating the issue so we could investigate it further.
WebDataGridEditorProviderWithValidator.zip
Best regards,
Bobby Kulov
Infragistics Developer Support
Unfortunately, even when I run what you've sent I'm not seeing any message or anything when I make the date field blank. I'm not really sure why it isn't working.
Could you please open a support case and attach a sample reproducing the issue. Don't forget to mention the exact version of the Infragistics.dlls you are using so we can investigate it further.
I forgot to mention that in my sample pressing Enter key after making a Date cell empty won't invoke the validation. To invoke the validation the cell should lose focus. So make a Date cell empty and click somewhere else in the grid to invoke the validation.
My project was still using 2015.2 controls and when I went to submit a support case, that wasn't an option. So I have upgraded my controls to the 17.2 controls and now the RequiredFieldValidator works as expected.
I am glad that everything is working fine now.