How to access RadzenButton IsBusy in DataGrid colum emplate

Hi Radzen team
I wanted to control button IsBusy property which is located inside DataGrid Coulumn Template. How can I set IsBusy for particular button in datagrid while I call HandleServiceButtonClick?

<RadzenDataGrid TItem="DashboardServiceView" Data="ServiceWatchers">
                        <RadzenDataGridColumn TItem="DashboardServiceView" Property="Id" Title="Id"/>
                        <RadzenDataGridColumn TItem="DashboardServiceView" Property="AppName" Title="Application"/>
                        <RadzenDataGridColumn TItem="DashboardServiceView" Property="ServiceStatus" Title="Service Status">
                            <Template Context="context">
                                <RadzenButton Text="@context.ServiceStatus"
                                              Click="@(() => HandleServiceButtonClick(context.ServiceStatus, context.FullName, context.Server))"/>

private bool IsBusy;

private async Task HandleServiceButtonClick(string serviceStatus, string serviceName, string serverName)
            // some logic where I wanted to set IsBusy properity 

Hi @CoffyOffe,

Using a single property won't work as you have seen - this way all buttons will have their IsBusy attribute set to the same value. I would recommend adding an IsBusy property to your DashboardServiceView class.

<RadzenButton Text="@context.ServiceStatus"  

Alternatively you could use a dictionary.

private IDictionary<int, bool> isBusy = new Dictionary<int, bool>();
<RadzenButton Text="@context.ServiceStatus"  

The idea is to keep a separate "is busy" status for every button.

Thanks, got it wotking by extending DashboardServiceView class and adding IsBusy property.

<RadzenButton IsBusy="@context.IsBusy"
              Click="@(() => HandleServiceButtonClick(context))"/>

private async Task HandleServiceButtonClick(DashboardServiceView item)
        item.IsBusy = true;
      // other loguc