-
I'm encountering an exception when using HxGrid and cancelling an ongoing EF query due to page changes. Problem:The code snippet below demonstrates how I provide data for
The issue arises when the user navigates away from the page before the query finishes. This triggers a The exception propagates to the highest level and ultimately disrupts the navigation, preventing the user from reaching the desired page. (Full stack trace will be provided later.) Solution (workaround?):To address this, I implemented error handling using a try-catch block:
Proposed Improvement:However, I believe the ideal solution would be to handle cancelled queries within the HxGrid component itself, specifically in the InvokeDataProviderInternal method This approach would centralize the handling and potentially offer a more integrated user experience. Full exception:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Unfortunately, this is a known issue with SqlClient. See dotnet/SqlClient#26. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the information. I'll keep using my workaround and wait for Microsoft to correct the problem. I believe it will be soon. :-D |
Beta Was this translation helpful? Give feedback.
Unfortunately, this is a known issue with SqlClient. See dotnet/SqlClient#26.
We don't feel this is something we should resolve in
HxGrid
(where we expectOperationCancelledException
to be thrown).The workaround you proposed will most likely do the job.