My scenario is a lot similar to this one and I call SetStateAsync to exit the edit mode. In addition, my Grid is grouped on initialization. I noticed that each time I call SetStateAsync, the AggregateFunctions count of the GroupDescriptor increases and one more identical AggregateFunction is added to the same GroupDescriptor. This results in slowing the editing process.
Here is a simpler reproduction: https://blazorrepl.telerik.com/wekZmTPE35YpD8f504.
Hi Ron,
Thank you for sharing your temporary fix here, publicly. It is highly appreciated that you are allowing other developers facing the scenario to benefit from it.
Regards,
Hristian Stefanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
A better version
private async Task ExitEditAsync()
{
var state = GridRef?.GetState();
state.OriginalEditItem = null;
state.EditItem = null;
state.InsertedItem = null;
// This will fix the progressive slowness ---------------------------------------
foreach (var item in state.GroupDescriptors)
{
// Remove the AggregateFunctions since SetStateAsync doubles them
item.AggregateFunctions.Clear();
}
// This will fix the progressive slowness ----------------------------------------
await GridRef?.SetStateAsync(state);
}