Error when doing more than 1 deserialize action on a SfDataGrid
Any insight into what is happening?
We have analyzed your query that “Error when doing more than 1 deserialize action on a SfDataGrid”. We have tried to replicate your scenario but we are unable to reproduce the reported issue from our end. Please find the tested sample and video demo from our end in the below link,
Sample Link: https://www.syncfusion.com/downloads/support/forum/152129/ze/Sample989732021
If still you are facing the same issue, can you please share us below things?
Regards,
Thanks
Jay.
I did a bit
more testing and found that if I create a custom SerializationController and wrap the RestoreDetailsViewDefinition() method in an exception handler, then the rest of the grid seems to
deserialize correctly. So the bug / need for exception handling is
something to do with what’s happening in that method.
public class
CustomSfGridSerializer
: SerializationController
{
private static Logger _logger =
LogManager.GetCurrentClassLogger();
public CustomSfGridSerializer(SfDataGrid
dataGrid)
: base(dataGrid)
{
}
protected override void RestoreDetailsViewDefinition(SerializableDataGrid serializableDataGrid,
DeserializationOptions options)
{
try
{
base.RestoreDetailsViewDefinition(serializableDataGrid,
options);
}
catch (Exception e)
{
_logger.Info("CustomSfGridSerializer caught and
handled an error that should have been dealt with by Syncfusion");
}
}
}
Regards,
Phil
- 2 Replies
- 3 Participants
-
PN Phil Nixon
- Mar 3, 2020 06:52 PM UTC
- Mar 11, 2020 03:06 PM UTC