How to stop UI refreshing radzen grid when user is editing?

I have a radzen grid in my webassembly project:

<RadzenGrid @ref="serversGrid" AllowFiltering="true" FilterCaseSensitivity="Radzen.FilterCaseSensitivity.CaseInsensitive"
                AllowPaging="true" AllowSorting="true" Data="@serverData" TItem="Server"
                ColumnWidth="200px" RowUpdate="@OnUpdateRow" PageSize="10">
<Columns>
<RadzenGridColumn TItem="Server" Property="Status" Title="Status">
                <EditTemplate Context="server">
                    <RadzenDropDown @bind-Value="server.Status" Data="@statusList" Style="width:100%" />
                </EditTemplate>
            </RadzenGridColumn>
</Columns>

I also implemented signalr into my application with a timer set to every 5 seconds. On elapsed, this timer will push up to date data from sql to the radzen grid and basically update the grid to display real time data every 5 seconds using StateHasChanged().

My problem is that when the user is trying to use the edit function to edit the server, if timer elapsed, the statehaschanged() will occur and then the grid will rerender and basically stop the user from editing. They will now have to click the edit button again in order to make changes.

Is there any way that I can lock the radzen grid while a user is on the edit mode? And then unlock it when the user is off the editing mode?

Thanks!

No, there is no such way. I think you should disable / stop / suspend the timer when the user enters edit mode and enable it again when the record is saved or cancelled.

1 Like

alright :frowning: thank you for that