After filtering boolean or datetime column 'Argument types do not match' on the backend

I'm using 19.2.55 on angular, and 19.2.0.59 on .net core backend versions

My code works with string columns, but not with boolean and datetime columns.


On the controller I'm receiving DataManagerRequest

DataOperations operation = new DataOperations();

DataSource = operation.Execute(DataSource, dm);

And after calling Execute this exceptions occurs: 'Argument types do not match'


Thanks



2 Replies

RR Rajapandi Ravi Syncfusion Team September 3, 2021 07:34 AM UTC

Hi Dimitar, 

Greetings from Syncfusion support 

We are able to reproduce your reported issue from our end. And we have forwarded your query to our internal team, and we need some time to validate. So, we will update you the details on Tuesday, 7th Sep 2021. Until then we appreciate your patience. 

Rajapandi R 




AG Ajith Govarthan Syncfusion Team September 8, 2021 04:34 PM UTC

Hi Dimitar, 

Sorry for the delayed update. 

Query: After filtering boolean or datetime column 'Argument types do not match' on the backend 

We have checked the reported behavior and found that by default,  .net Core 3 uses System.Text.Json instead of Newtonsoft for serializing. So, the boolan value is converted as JSON Element which is the cause of this issue. So, we suggest you add the below newtonsoft serilization in startup page to avoid the type mis match issue in the backend. Please refer the below code example for your reference. 

Code Example: 
Startup.cs 

services.AddMvc().AddNewtonsoftJson(options => 
options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver(); 
}); 




Please get back to us if you need further assistance. 

Regards, 
Ajith G. 




Loader.
Up arrow icon