Need a little help

I have a RadzneDataGrid that is filled with data. The DataGrid has the option DataGridSelectionMode.Single and when I execute some other component that I reach with NavigateTo and return with same NavigateTo, the datagrid knows all the values ​​based on which it could restore the table with all selected data that was before the call of the other component. In the OnAfterRenderAsync section I execute the following code:

‚‚‚

            if (pendingSelection && grid0 != null)
            {
                pendingSelection = false;
                await grid0.Reload();
                var match = gKGKNCollection?.FirstOrDefault(x => x.BRNAL == brnal);
                if (match != null)
                {
                    brnal = 0;
                    await grid0.SelectRow(match, true);
                    StateHasChanged();
                }
            }
‚‚‚

everything works as I expect and all the values ​​in the variables are as they should be but the line in the RadzenDataGrid is not marked as selected.
What did I miss to do?

You need either @bind-Value or a RowSelect handler.

If you refer to RadzenDataGrid definition it looks like this:

        <RadzenDataGrid @ref="grid0" ColumnWidth="200px"   AllowFiltering="true"  Density="Density.Compact" FilterMode="FilterMode.CheckBoxList" AllowPaging="false"   AllowSorting="true" ShowPagingSummary="true"  Style="flex: 1; height: 100%;"
            Data="@(gKGKNCollection)" TItem="ErpBox.Models.ERPDATA.GKGKN" RowDoubleClick="@EditRow" AllowVirtualization="true"
                            SelectionMode="DataGridSelectionMode.Single" @bind-Value="@selectedGkn" RowSelect="@SelRow">

so @bind-Value and RowSelect are working as they suppose to but when I OnAfterRenderAsync I tried to reestablish selected row every property has values but selected record is not rendered as selected.

StateHasChanged() of the page might not cause rerender while Reload() will do. I don’t know the context of your scenario however you might need to call Reload() after SelectRow() to force the DataGrid to rerender with selected row styles.