Grid Asp.Net Core Razor Page - Crud operation not firing ActionFailure when throwing an exception

I've read so many threads about getting exceptions using ActionFailure, that i am going mad to find out why in my case it doesn't work, even using the examples you provided on previous threads...

On server side i get "Exception User Unhandled" when throwing an exception.

Could you please help ?



Attachment: SyncFusion_ej2_Grid_Crud_Operations_72e2dbab.zip

1 Reply

RR Rajapandi Ravi Syncfusion Team October 1, 2021 11:59 AM UTC

Hi Pedro, 
  
Greetings from Syncfusion support 
  
From your update, we could see that you are throwing the exception at server side and like to fire the actionFailure event of Grid.  
  
By default, if any Grid actions fails at server and client side while execution, it will trigger the actionFailure event.  
  
We have checked your shared sample and we could see that you are using a condition in the Insert method. We suspect in your case all your actions are passed in that condition, so only the actionFailue event was not triggerd. 
  
We've provided the input that will cause the actions to fail and fire the actionFailure event. For further details, please see the video demonstration below. 
  
  
  
Regards, 
Rajapandi R

Loader.
Up arrow icon