Radzen control not react to click event in mainlayout.razor

.NET 8 Blazor - interactiveServer rendering mode, the RadzenSidebarToggle click event not working, tested with radzenButton also click event not working -

@Body
Footer

but a new page click on counter works
@page "/counter"
@rendermode InteractiveServer

Counter

Counter

Current count: @currentCount

<button class="btn btn-primary" @onclick="IncrementCount">Click me

@code {
private int currentCount = 0;

private void IncrementCount()
{
    currentCount++;
}

}

1 Like

Hi @John_Lee,

This is by design - in Blazor 8 SSR mode events don't fire. You can check the getting started instructions how to enable events. You can also refer to the Blazor documentation.

I am not using SSR - I have the @rendermode InteractiveServer on /counter and it works but if I added @rendermode="InteractiveServer" to Routes and HeadOutlet then the /counter page click no longer works and also the RadzenPanelMenuItem Text="Home" Icon="home" Path="/" - no longer go to root after click on home, only works to hit enter on browser address bar

I suggest you review the linked Blazor help article. The issue you have isn't related to the Radzen.Blazor components.