How to make OK button do function on Radzen Confirm Dialog?

I have a radzen confirm dialog button:

<RadzenButton Text="Show confirm dialog" Click=@(args => dialogService.Confirm("Are you sure?", "Delete", new ConfirmOptions() { OkButtonText = "Yes", CancelButtonText = "No" })) />

How can I alter the code above so when the user clicks yes, it will go to my method?

<RadzenButton Text="Show confirm dialog" Click=@(args => MyMethod("string paramenter")) />

1 Like