With Ignite UI version 16.2, the Updating rowEditDialogClosing event has been replaced by the new rowEditDialogBeforeClose event but, unlike its predecessor, this event is not cancelable.
I need to validate the data entered by the user in the row edit dialog and cancel the closing event if it fails validation. How do I do this now if the event is not cancelable?
Hello Charles,
Ignite UI has a validation tool called igValidator. When in edit mode, if a field does not match the validator's criteria for a valid expression, the Done button is not clickable. The igValidator is activated by setting the validation option of a column to true. In the igValidator a custom validating function can be specified or a RegExp.
I have attached a sample, demonstrating how validation is achieved. Please test it and let me know if you have any additional questions.
Regards,Ivaylo HubenovEntry-level developer
Hi Ivaylo - Thank you for your reply. The igValidator tool looks like what I need to use.
So, in my Edit Row Dialog I have two decimal fields: Lower Value and Upper Value. I have to validate that the Upper Value is > than the Lower Value. A similar requirement is to ensure that in a date range entry, the End Date is > than the Start Date.
Do you have an example on how I can handle comparing the value of one field against another using the validation tool?
Charles
Yes, I have a sample, demonstrating validation of dates, where the "From" date cannot be greater than the "To" date. I have achieved this functionality via the igValidator's custom option and a global variable.
I have attached the sample. Please test it and let me know if you have any questions.
Thank you Ivaylo - your example is exactly what I needed.