Skip to content

Grid filtering throws 'System.OperationCanceledException' in System.Private.CoreLib.dll #630

Closed Answered by hakenr
resignationinfinite asked this question in Q&A
Discussion options

You must be logged in to vote

Not sure what you mean by "in the logs", but OperationCanceledException is a regular outcome of using CancelationTokens and canceling the operation. For example, when you are scrolling the grid, the DataProvider gets called for visible ranges of items. When you scroll to another part of the dataset while the original DataProvider-request is still running, it gets canceled.

Ideally, you should pass the CancelationToken to your GetOptOutDonorsAsync() as DonorService.GetOptOutDonorsAsync(requrest.CancelationToken) and allow it to cancel the async operation in its own way (ie. by passing the CancelationToken to underlying Entity Framework call or similar infrastructure code).

For more details…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by resignationinfinite
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #629 on October 17, 2023 21:37.