Updating values without statechanged

hi is there anyway i can update my radzen datagrid without calling the statechanged ? my issue is that i have a radzendatagrid and as a child element of each column i have a chart that the user can get up by pressing the column. when i update values of the chart on a 5 min interval, it refreshes the site and therefor closes the column child chart.

Any workaround for this ?
Code:

    protected override async Task OnInitializedAsync()
    {
        var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
        var user = authState.User;

        if (user.Identity.IsAuthenticated)
        {
            userId = user.FindFirst(c => c.Type == "preferred_username")?.Value;
            IsAdmin = user.IsInRole("Administrator");
            if (!IsAdmin && string.IsNullOrEmpty(userId))
            {
                Navigation.NavigateTo("/NoSensorsAssigned");
            }
        }

        await LoadSensorData();

        // Start timer
        _timer = new Timer(async _ =>
        {
            await LoadSensorData(); 
            await InvokeAsync(StateHasChanged);
        }, null, _refreshInterval, _refreshInterval);
    }
    private async Task LoadSensorData()
    {
        _working = true;
        _sensors = await DbService.GetSensors(false, IsAdmin, userId);
        MapSensorDataToOverviewer();
        _working = false;
    }
    public void Dispose()
    {
        _timer?.Dispose();
    }

Not sure how a column can be closed - can you provide more details?

I have a main page called SensorOverview, it contains a series of columns with data about the sensor. Each column contains a component that is a chart that can be viewed by pressing a button:


each time i update the values in the main page, the component that is viewed via a dropdown will close as the page refreshes (f5) statehaschanged

F5 refresh and StateHasChanged() behavior is completely different - again I'm not sure from the provided details so far where the Chart is declared in the DataGrid and how a column can be "closed". Anyway, it's always smart to move the code from templates to a separate component where internally you can call StateHasChanged() for the component itself and do not refresh complex components and/or pages.

Statechanged Re-renders the component, so if the component has child components they will be closed because their open/closed state i tied to the parent-component rendering cycle.

Example: if i have a dropdownlist(child component) that i have opened in the mainpage(parent component) and 5 min ticks in and it runs statechanged on the parent, the dropdownlist will close.

I need that childcomponent to stay open somehow

I'm afraid that I'm unaware of such approach.

Using Datagrid is there anyway i can keep track if a component is closed ? because then i could just toggle if the child component is open or closed and then stop the parent from updating values based on a boolean value

private async Task RowClick(DataGridRowMouseEventArgs<SensorOverviewer> args)
{
    await _grid!.ExpandRow(args.Data);
    if (ongraphOpen == true) {
        ongraphOpen = false;
    }else
    {
        ongraphOpen = false;
    }
    

}

i got rowclick that i got working for when i open a component but i cant find much for when i close one.

this is piece of the frontend code :

 <RadzenDataGrid @ref="_grid" Data="@_sensorOverviewer" TItem="SensorOverviewer" AllowSorting="true" SelectionMode="DataGridSelectionMode.Single" AllowPaging="true" AllowFiltering="true" AllowColumnResize="true" EmptyText="Ingen sensorer funnet i databasen." FilterDateFormat="dd.MM.yyyy"
                 IsLoading="_working" PageSize="30" FilterMode="FilterMode.Simple" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
                 ApplyFilterText="Bruk" ClearFilterText="Nullstill" EqualsText="Er lik" NotEqualsText="Ulik" LessThanText="Mindre" LessThanOrEqualsText="Mindre eller lik" GreaterThanText="Større" GreaterThanOrEqualsText="Større eller lik"
                 EndsWithText="Slutter med" ContainsText="Inneholder" StartsWithText="Starter med" PagerHorizontalAlign="Radzen.HorizontalAlign.Center" ShowPagingSummary="true" PagingSummaryFormat="@_pagingSummaryFormat" ExpandMode="DataGridExpandMode.Single" RowClick="@(args => RowClick(args))">

     <Template Context="sensorOverviewer">
         <SensorDetails sensorOverviewer="@sensorOverviewer"/>
     </Template>
<column></column>
<column></column>
</RadzenDataGrid>