You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn about the events and event arguments of the Telerik TabStrip for Blazor.
5
5
slug: tabstrip-events
6
-
tags: telerik,blazor,tab strip,events
6
+
tags: telerik,blazor, tabstrip, events
7
7
published: True
8
8
position: 20
9
9
---
@@ -19,12 +19,13 @@ This article explains the events available in the Telerik TabStrip for Blazor:
19
19
20
20
The `ActiveTabIdChanged` event was added in [version 9.0.0](https://www.telerik.com/support/whats-new/blazor-ui/release-history/telerik-ui-for-blazor-9-0-0-(2025-q2)). It fires when the user changes the active tab. The event handler receives the new tab ID of type `string` as an argument. If the `Id` parameter of the `TabStripTab` is not set, the component will generate one automatically.
21
21
22
-
The `ActiveTabIdChanged` event is designed to work with the new [`ActiveTabId` parameter](slug:tabstrip-tabs-collection).
22
+
The `ActiveTabIdChanged` event is designed to work with the new [`ActiveTabId` parameter](slug:tabstrip-tabs-collection). Update the `ActiveTabId` parameter value manually in the `ActiveTabIdChanged` handler.
23
23
24
-
>caption Handle the tab ID selection changed event
24
+
>caption Handle the TabStrip ActiveTabIdChanged event
The `ActiveTabIndexChanged` event fires when the user changes the tab that is currently shown. The event handler receives the new index as an argument.
54
+
The `ActiveTabIndexChanged` event fires when the user selects another tab. The event handler receives the new zero-based index as an argument. Update the `ActiveTabIndex` parameter value manually in the `ActiveTabIndexChanged` handler.
54
55
55
-
If you remove programmatically the currently active tab, when it disposes, the event will fire with index `-1` as there will be no selected tab anymore.
56
+
If you programmatically remove the currently active tab, the `ActiveTabIndexChanged`event fires with index `-1` as there is no selected tab anymore.
56
57
57
-
> The `ActiveTabIndexChanged` event and `ActiveTabIndex` parameter will be deprecated in a future releases. It is recommended to use the [`ActiveTabId`](slug:tabstrip-tabs-collection) parameter with [`ActiveTabIdChanged`](slug:tabstrip-events#activetabidchanged) event instead.
58
+
> The `ActiveTabIndexChanged` event and `ActiveTabIndex` parameter will be deprecated in a future product version. Use the [`ActiveTabId`](slug:tabstrip-tabs-collection) parameter with [`ActiveTabIdChanged`](slug:tabstrip-events#activetabidchanged) event instead.
58
59
59
-
>caption Handle the tab selection changed event
60
+
>caption Handle the TabStrip ActiveTabIndexChanged event
result = $"current tab {newIndex} selected on {DateTime.Now}";
83
+
TabStripActiveTabIndex = newTabIndex;
81
84
}
82
85
}
83
86
````
84
87
85
-
>caption Cancel the event
88
+
If you do not update the `ActiveTabIndex` parameter value in the `ActiveTabIndexChanged` handler, the selected tab will not change, so the event will be cancelled.
86
89
87
-
````RAZOR
88
-
@* If the tab strip is bound to a field in the view model, when you do not update that field in the event handler, you will effectively cancel the event *@
0 commit comments