I have a DeleteHandler:
private async Task OnDeleteAsync(GridCommandEventArgs args)
{
if (ViewModel == null) throw new InvalidOperationException("ViewModel == null");
if (!(args.Item is ProductUi product_ui)) throw new InvalidOperationException("!(args.Item is ProductUi product_ui)");
if (product_ui.Id == null) throw new InvalidOperationException("product_ui.Id == null");
var result = await ViewModel.DeleteUiAsync(product_ui.Id.Value);
if (result.Error != null)
await Dialogs!.AlertAsync(result.Error, "Delete Error");
}
If there is an error I try to display it using one of Telerik's standard Dialogs.
If there is an error the dialog is displayed, however the grid then displays a busy spinner and the entire window is disabled.
There is now a deadlock, can't close the dialog because the grid has disabled input, the grid is busy because it is waiting for the dialog.