Handle RowSelect in DataGrid

I'm trying to catch the RowSelect event, but can't figure out the method signature. Do you have a code example? I've tried variations on the below

  void RowSelect(RadzenGrid<object> args)
        {
            
        }

Hi @Mike_Casas,

The Master detail example shows how to use the RowSelect event. The event argument is the data item which the DataGrid row is bound to. It is of the same type as the type parameter of the DataGrid.

<RadzenGrid TItem="Customer" RowSelect=@RowSelect>
</RadzenGrid>

@code {
   void RowSelect(Customer customer)
   {
   }
}
4 Likes

Argument 2: cannot convert from 'method group' to 'Microsoft.AspNetCore.Components.EventCallback'

Hi @L_Z,

Post your code so we can check it out.

I figured it out, I was the missing TItem property:

RowSelect="@(args => OnRowSelect(args))" TItem="Order"

private void OnRowSelect(Order order)