Master-Detail Grid Closing Details after Update - Help Needed!

Hi everyone,

I'm working on a Blazor Server project with a master-detail data grid using the [RadzenDataGrid]. The master grid shows orders, and clicking an order expands it to display its details in a nested detail grid.

The Problem:

When I add a new detail through [InsertDetailRow] and then update the order (save) through [SaveRowDetail], the detail grid unexpectedly collapses, hiding the newly added information.

private async Task InsertDetailRow(int id)
{
    _detailToInsert = new OrderDetailDto
    {
        OrderId = id,
        Status = "Order Opened"
    };
    await _gridDetail.InsertRow(_detailToInsert);    
}
async Task SaveRowDetail(OrderDetailDto orderDetail)
{
    await _gridDetail.UpdateRow(orderDetail);

    if (orderDetail.ProductCode != null)
    {
        if (orderDetail == _detailToInsert)
        {
            _detailToInsert = null;
        }
    }      
    await _gridDetail.Reload();
        

Troubleshooting:

I've tried [not reloading the grid but the newly added row did not display on the grid].

Any insights or suggestions on how to avoid closing the details after adding and saving would be greatly appreciated!

Additional Info:

Thanks in advance for your help!

Hey Robot, you could try

_gridDetail.ExpandRow(orderDetail)
StateHasChanged()

after the _gridDetail.Reload()

@Ricardocza it did not work :frowning: