How to notify pivotgrid about an exception when streaming data
Sorry, posted the question before specifying the details. Please download a sample project here. It streams half of the data to the grid and then throws an exception. The exception is then catched and handled. Any way to notify the grid about the exception so it displays an error alert instead of just displaying half of the data.
Thank you for the request.
Unfortunately, there is no way to handle error while streaming the data.
With regular response (not streaming) it is possible to simply change the response status code if an error occurred.
Could you please specify in what cases exception is thrown?
Also, we have improved our Compressor library to support variety of SQL databases and streaming out of the box, please find more information in the documentation.
The most common case is a timeout issue here, when pulling large data sets part of the data might have already be sent. Another common case for us is cancellation functionality. We have a cancel button on UI which allows to cancel report query if it takes too long, a user has changed his mind or noticed a typo in the report filters. In this case part of the data might have already been sent as well when the query is cancelled.
Thank you for the compressor update, I will take a look.
The idea with cancellation looks really reasonable and we’ll add this feature to the roadmap.
Anyway, try the updated compressor it will help you to resolve timeout issue.