Hi Ben,
Greetings
from Syncfusion support.
The RowSelected
event will be triggered when selecting a row in grid. Now in this event handler
you can call the ExpandCollapseDetailRowAsync method to achieve this
requirement. Please refer and use as like the codes below to achieve this
requirement. We are also attaching a modified sample in this ticket.
|
<GridEvents DetailDataBound="DetailDataBound" RowSelected="RowSelected" DataBound="DataBound" TValue="EmployeeData"></GridEvents>
public async Task RowSelected(RowSelectEventArgs<EmployeeData> args)
{
if (target != null)
{
await Grid.ExpandCollapseDetailRowAsync(target);
target = null;
}
}
|
Reference
:
https://blazor.syncfusion.com/documentation/datagrid/events#rowselected
https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_ExpandCollapseDetailRowAsync__0_
Please get
back to us if you need further assistance.
Regards,
Renjith R
Attachment:
SampleHGrid349566863_9f3c627.zip