I have a grid that contains 18,000 order objects. When I add an aggregate function to a column to sum the total of the orders, it takes approximately 10 minutes for the operation to be completed. I realize that the aggregate function is going order by order to get the correct amount for the column's property, and as it does this, my objects have to calculate the value that needs to be added to the sum. However, while it does this, my user's screen is frozen and the program is not responding. It does eventually complete the operation, and everything is correct/usable.
My question is, is there a good way to add an aggregate function in the background, so the user doesn't experience a frozen screen? Is there a way to cancel adding the aggregate function if it is taking too long, or does the operation have to be completely executed before anything else can be done?
My question is, is there a good way to add an aggregate function in the background, so the user doesn't experience a frozen screen? Is there a way to cancel adding the aggregate function if it is taking too long, or does the operation have to be completely executed before anything else can be done?