Set custom validation error in default edit dialog

Hi,

is it possible to set custom validation error in default edit dialog or do i need to create my custom edit dialog? I need to validate the data on server.


5 Replies 1 reply marked as answer

SP Sarveswaran Palani Syncfusion Team May 30, 2022 01:44 PM UTC

Hi Ladislav,


Greetings from Syncfusion Support.


Query: "Is it possible to set custom validation error in default edit dialog or do I need to create my custom edit dialog?"


We have analyzed your query and we have already discussed about this topics detailly in our UG documentation. Kindly refer the documentation link shared.


Refer our UG Documentations : https://blazor.syncfusion.com/documentation/datagrid/column-validation#custom-validation


If you have further queries, please get back to us


Regards,

Sarveswaran PK



LP Ladislav Polacek replied to Sarveswaran Palani May 30, 2022 02:31 PM UTC

Hi,

thanks for response. I know i can do custom validator. I should probably specified that im using remote data binding. My problem is that i need to get access to the PUT response from server when i click Save in default edit dialog. I found that i can access failed action in ActionFailureHandler, but then how do i pass that information to the edit dialog validator? I d



SP Sarveswaran Palani Syncfusion Team May 31, 2022 05:59 PM UTC

Hi Ladislav,


Thanks for contacting Syncfusion support.


We have analyzed your query and we understand that you want to perform server side validation by sending a request to your API. But it will not be possible to catch OnActionFailure event when CRUD operation fails and display the error details as a validation in Grid edit form.  So, we suggest achieve your requirement using custom validator component and handle the action in validator component.


Kindly refer the documentation link shared.


UG Documentation: https://blazor.syncfusion.com/documentation/datagrid/column-validation#custom-validator-component


Please get back to us if you have further queries or above solution does not match your requirement.


Regards,

Sarveswaran PK


Marked as answer

LP Ladislav Polacek replied to Sarveswaran Palani June 1, 2022 06:41 AM UTC

Thanks , i got it working.



SP Sarveswaran Palani Syncfusion Team June 2, 2022 01:32 PM UTC

Hi Ladislav,


Thanks for your update.


We are happy to hear that your issue has been resolved.


Please get back to us if you need further assistance.


Regards,

Sarveswaran PK


Loader.
Up arrow icon