ClearGrouping and System.InvalidCastException

Hi,

Context:

I am developing a DataGrid component with a custom adapter.

In the DataGrid, I add a custom button called “RAZ filters”. This button clears all searches, groupings, filters, sorts, and focuses.

I’m using Blazor server in prerender mode. The Syncfusion NuGet is 19.1.0.59.

Problem:

Unfortunately, I experience problems with the clear grouping functionality (called by “RAZ filters” button). In some cases, it fails with System.InvalidCastException.

This fail only appears in some configurations of the dataGrid component.

The condition that seems mandatory to make this problem appears are:

  • At least one column has the parameter AutoFit equals true.
  • The parameter EnablePersistence of the grid equals false.
  • The parameter GridSelectionSettings of GridSelectionSettings equals true.


I attached an example that reproduce the problem. It is not the DataGrid component I’m using in my project but a simplified version

Thanks for your help.

Best regards.

François


Attachment: ClearGrouping_67c319df.zip

2 Replies

FR Francois May 19, 2021 10:38 AM UTC

Today, I updated the NuGet to 19.1.0.64 and the problem disappears from the attached example but it persists in my DataGrid component.

I will update this thread if I have more information or another example.



RS Renjith Singh Rajendran Syncfusion Team May 20, 2021 04:38 AM UTC

Hi Francois, 

Greetings from Syncfusion support. 

Thanks for your update. Please check this from your side, and get back to us with more details if you need further assistance. 

Regards, 
Renjith R  


Loader.
Up arrow icon