Not able to select tabs

1 Answer 53 Views
TabStrip
Ken
Top achievements
Rank 1
Ken asked on 15 Mar 2025, 01:45 PM

I am new to using the UI for Blazor products.  I added the code from https://www.telerik.com/blazor-ui/documentation/components/tabstrip/overview

The control renders but I am not able to select the 3d tab, the control remains on the first tab.  Any help on why would be appreciated.

Here is the code from the razor page.

@page "/Reports/report-main"

@using Telerik.Reporting;
@using Telerik.Blazor.Components;

<h3>Report Main</h3>

<!-- Tabs -->
<div>
    <TelerikTabStrip>
        <TabStripTab Title="First">
            First tab content.
        </TabStripTab>
        <TabStripTab Title="Second" Disabled="true">
            Second tab content. This tab is disabled and you cannot select it.
        </TabStripTab>
        <TabStripTab Title="Third">
            Third tab content.
        </TabStripTab>
    </TelerikTabStrip>
</div>

@code {

}
Dimo
Telerik team
commented on 19 Mar 2025, 06:47 AM | edited

@Ken - make sure that the TabStrip is placed in an interactive .razor file. If the problem persists, send me your test app.

1 Answer, 1 is accepted

Sort by
0
Accepted
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
answered on 16 Mar 2025, 04:44 PM
Hi Ken,

The provided code sample works as expected, and you can verify this by running it here: https://blazorrepl.telerik.com/GTEnPKlg37PuAzs130.

It seems that the issue may be related to your application's setup. To troubleshoot, check your browser's development tools for any errors. Additionally, try clearing your project's bin and obj folders and rebuilding the project. This often resolves various project-related issues.

Regards,
Anislav Atanasov
Ken
Top achievements
Rank 1
commented on 19 Mar 2025, 11:56 PM

I added

@rendermode InteractiveServer

to the web page and I am able to select the tabs.

Do I need to add the rendermode to all pages?  I am learning both Telerik and Blazor.

Dimo
Telerik team
commented on 20 Mar 2025, 06:33 AM

@Ken - we recommend using a Global interactivity location, so that you don't have to deal with @rendermode at all. If this is not possible, then you need interactive render mode wherever you are using Telerik Blazor components.
Ken
Top achievements
Rank 1
commented on 21 Mar 2025, 09:47 PM

Sorry, but I am not getting what needs to be done from the link.  When I added <Routes @rendermode="InteractiveServer" />

it caused the application to refresh the page over and over.

Is there a link to a minimal application I can compare to?

 

Dimo
Telerik team
commented on 24 Mar 2025, 06:55 AM

@Ken 

>> When I added <Routes @rendermode="InteractiveServer" /> it caused the application to refresh the page over and over.

This suggests that the TabStrip is placed in an app section, which must remain static, for example, the Account section of a Microsoft Identity project template. In this case, setting a global unconditional interactive render mode is not possible, because Microsoft Identity requires static render mode. Referring to our linked interactive render mode documentation....

>> The Account section in the Blazor Web App template with identity is static by design. Most Telerik Blazor components cannot work in this section.

I am sending a simple app with a working TabStrip.

Tags
TabStrip
Asked by
Ken
Top achievements
Rank 1
Answers by
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Share this question
or