We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Handling datasource errors

Is their a best practice to manage datasource errors in the datagrid?  When i load a datasource that has unexpected field data, the whole grid fails to load.  How can i handle this through best practice.

System.FormatException: Input string was not in a correct format.

1 Reply

VN Vignesh Natarajan Syncfusion Team December 30, 2019 01:23 PM UTC

Hi Anthony,  

Greetings from Syncfusion support.  

Query: “Is their a best practice to manage datasource errors in the datagrid? 

You can use OnActionFailure event to find and manage the cause of the issue caused during certain actions in Grid. Refer the below UG documentation for your reference 


The reported issue “input string was not in correct format” might be caused when data is returned in wrong format from server while using Data Adaptor of EjsDataManager. For eg- WebAPI adaptor, data must be retuned in form of Items and Count. If you do not return the value in that format, reported issue might occur. Kindly refer the below UG documentation.  


If you are still facing the issue, kindly get  back to us with more details about your issue like your adaptor type, dataSource return values. etc   

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon