SfGrid error when using Excel like filter and column with complex property is sorted

Hello,

please check attached project: i have a grid (in FetchData page) with a column binded to a complex property and the grid is set to use Excel like filtering.

If I try to open filter popup after first load of the page, it works fine. If I then sort the column with the complex property as FieldName (Wind.WindName in the sample) and after that I try to open the filter popup on one of the other columns, an error is thrown.

In the .zip file you can also find a video showing the issue.

Any help?

Thanks


Attachment: 20211105_163653_7ebaec2f.zip

1 Reply

RS Renjith Singh Rajendran Syncfusion Team November 8, 2021 02:44 PM UTC

Hi Roberto, 
 
Greetings from Syncfusion support. 
 
We have analyzed the shared sample, and we could see that you are assigning null for the complex type field. So based on this scenario, we suggest you to assign empty object instead of null for the complex type field to overcome the reported problem. 
 
 
public Task<IEnumerable<WeatherForecast>> GetForecastListAsync(DateTime startDate) 
{ 
    var rng = new Random(); 
    return Task.FromResult(Enumerable.Range(1, 20).Select(index => new WeatherForecast 
    { 
        ... 
        Wind = (index % 2) == 0 ? new Wind { ID = 1, WindName = "Sirocco" } new Wind(), 
    })); 
} 
 
 
We are also attaching a modified sample for your convenience, please download the sample from the link below, 
 
Kindly refer the above sample and if you are facing any difficulties or if we have misunderstood your requirement then kindly get back to us with the details to proceed further. 
 
Regards, 
Renjith R 


Loader.
Up arrow icon