I have a GridCommandButton with a custom action.
If I click directly on the button, the select row is not set. How can I get the content of the row when I click the button?
<GridCommandButton Command="SyncWithAD" Icon="@FontIcon.Lock" Title="Sync to Azure" Enabled="CanEdit" OnClick="@ShowSyncUserWithAdDialog"></GridCommandButton>
Use the GridCommandEventArgs.Item
private async Task ShowSyncUserWithAdDialog(GridCommandEventArgs args)
{
if(args.Item is not JasminExternalUser user) return;
Progress.Visible = true;
var props = new JasminUserAdProperties { Email = user.Email, Name = user.Name, Groups = [] };
AdProperties = await UserService.GetUserAdProperties(props);
Progress.Visible = false;
}