Problem with Odata request in the grid when trying to use Excel export
Hi,
I have encountered something strange with the export grid feature on the SF Grid in a Blazor app. Normally it works fine, but when filtering on some values of a particular column the endpoint that gets queried returns the following error:
The query specified in the URI is not valid. No function signature for the function with name 'startswith' matches the specified arguments. The function signatures considered are: startswith(Edm.String Nullable=true, Edm.String Nullable=true).
My takeaway from this is that the query that the grid constructs is invalid and that for some reason the grid doesn't like the value provided causing the query to be 'malformed'.
It's like for some values it doesn't recognise it as a string properly, or at least that's my guess and I'm not sure.
The issue occurs when the value is in the form: dZ0dddd, where d is a digit. For example: 4Z01000 and 5Z01234.
Again, I'm not sure what could be causing this but my uneducated guess is that it might be trying to read the value a as a time instead of a string or something. So far this has not come up with any other type of value for this column and other than this strange case the grid export is working normally when filtering on other values.
In terms of the grid, the column type is a string. It's using an ODataV4 adapter and is calling an Odata endpoint which serves as a backend.
I'd appreciate any help or suggestions on this, as it seems to be a problem with the Syncfusion grid itself and I haven't been able to find any workarounds to prevent it.
Thanks,
Ronan
Hi Ronan van de Vyver,
We are unable to reproduce the reported issue. For your reference, we
have attached a sample project and screenshot. To further investigate the
issue, we need additional clarification from your side. Please provide the
following details to help us proceed:
- Could you please share us the grid code snippet with model class?
- To help us analyze the issue, could you provide a simple reproducible sample with duplicate data that demonstrates the problem? This will allow us to identify the issue more effectively and provide a resolution.
- Alternatively, you could share your attempt to replicate the issue using the attached sample.
|
|
The information you provide will be very helpful in validating the reported
query on our end and in providing a solution as quickly as possible. Thank you
for your understanding.
Regards,
Prathap Senthil
Attachment: DataGridExport_5572cc0d.zip
Hi Prathap,
Thanks for your reply.
I have downloaded the sample you provided and managed to reproduce the issue, however it seems to only happen after a user applies a filter. When you filter on certain strings, apply the search and then try to export, the issue occurs (screenshot as example, error below). So it seems to be a problem with the filter combining with the grid export.
Thanks,
Ronan
Hi Ronan,
We have considered it as a bug and logged an issue “Filtering Causes Incorrect Data Conversion During Grid Export” for the same. Thank you for taking the time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our patch release which is expected to be rolled out on or before 18th February 2025 .
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
https://www.syncfusion.com/feedback/65156/filtering-causes-incorrect-data-conversion-during-grid-export
Disclaimer: “Inclusion of this solution in the weekly release may
change due to other factors including but not limited to QA checks and works
reprioritization”
Until then we appreciate your patience.
Regards,
Naveen.
Alright, thank you for taking the time.
We apologize for the inconvenience caused.
We were unable to include the fix in tomorrow’s patch release. However, we want to assure you that the fix will be included in our weekly patch release, scheduled on or before February 25th, 2025.We appreciate your patience and understanding. Thank you.
Hi Ronan van de Vyver,
Thanks for your patience,
We are glad to announce that, we have included the fix for the issue “Filtering Causes Incorrect Data Conversion During Grid Export” in our 28.2.7 release. So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the NuGet package for the latest fixes and features below.
NuGet : https://www.nuget.org/packages/Syncfusion.Blazor.Grid
Root cause : When filtering a string value like '1z01', the existing logic attempts to convert non-DateTime values into a DateTime type. This results in incorrect conversion and throws an exception during Excel and PDF export
Action Taken: Removed the condition that attempted to convert non-DateTime values to DateTime in ExcelExport and PdfExport, ensuring proper handling of string values.
Regards,
Guhanathan R
Thanks, I have updated and it seems to be working so far
Thanks for the update. We are happy to hear that the
issue has been resolved on your end. Please feel free to reach out if you have
any further queries regarding this issue.
- 8 Replies
- 4 Participants
- Marked answer
-
RV Ronan van de Vyver
- Jan 24, 2025 09:48 AM UTC
- Feb 27, 2025 06:37 AM UTC