How to show a message yes/no before delete record?

Hi, i have create a small app for testing, in the grid radzen have create a button to delete the record, but i need to show a message yes/no before the delete operation.

I read the documentation and i read the post how to use the Condition to insert the confirm('delete this ?').

How to do this from blazor ?

Many Thanks


Same question here....

The Blazor DataGrid does not have built-in delete confirmation support yet. One can use the Blazor JSInterop though.

  1. Open the Page.razor.cs file and add the following code to the page class
         IJSRuntime JSRuntime { get; set; }
         async Task<bool> Confirm(string message)
              var result = await JSRuntime.InvokeAsync<bool>("confirm", new [] { message });
              return result;
  2. Then in Radzen use the Invoke method action:
  3. Invoke the deleteXXX data source method if the Confirm method returned true.
1 Like

Hi..many tanks for the solution..

By Aurelio

Hello Radzen Team,
are you planning to add a "confirm delete" option on Blazor data grids? And on Button controls?
I use it on every delete action...


We probably will at some point. Not scheduled at the moment though.

I use for that.
Either you can have just a message saying "Are you sure?" or show what will be deleted.
It works very well.

1 Like

Where can i find the click event in datagrid?

Thanks for help

I use visual studio so I am not familiar with the Radzen tool, unfortunately. I guess you could klick on the red icon with the X and the click event would be there?

No. I cant click on the red X. it must be an event on the grid?!

@Radzen Team: can you explain?


Is a Button component in the DataGrid Column Template. You can use the template designer to reach that button:

With can show a a message for confirm an action.

There is already simplified way to show dialogs including confirm:


Doing this, every page with this dialog should then be excluded on Radzen Studio (not to be generated) ?


No, you can use the partial class of the page to define the method for showing simple dialog similar to the code in this thread: