Hi,
I have successfully implemented a pop-up dialog to confirm a user's action by using DialogService.Confirm() flow. But now I want to implement a busy indicator on the button and disable it while waiting for the call to finish.
I saw this in the Radzen examples source code which would work well for me:
async Task ShowInlineDialog()
{
var result = await DialogService.OpenAsync("Simple Dialog", ds =>
@<div>
<p class="mb-4">Confirm Order ID <b>@orderID</b>?</p>
<div class="row">
<div class="col">
<RadzenButton Text="Ok" Click="() => ds.Close(true)" Class="mr-1" Style="width: 80px;" />
<RadzenButton Text="Cancel" Click="() => ds.Close(false)" ButtonStyle="ButtonStyle.Secondary" Class="mr-1" />
<RadzenButton Text="Refresh" Click="(() => { orderID = 10249; ds.Refresh(); })" ButtonStyle="ButtonStyle.Light" Class="mr-1 float-right" />
</div>
</div>
</div>);
console.Log($"Dialog result: {result}");
}
However when I copy that code into my solution it throws a compilation error on the markup code for the RenderFragment parameter
Error CS1662 Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
My apologies if this isn't related to Radzen, but I'm hoping maybe someone could tell me why. I'm targeting .NET 6.0 (the same as the Radzen project).