RadTabStrip - clicking active tab

1 Answer 111 Views
TabStrip
Richard
Top achievements
Rank 1
Iron
Richard asked on 25 May 2023, 09:48 AM

I'd like to use the tab strip as a filter for a RadGrid below it -- meaning, I won't be using a multipage view but rather every tab will have the same content, just the filter for the radgrid will change based on which tab is selected.

I am using a hierarchical tab scenario, so the primary tabs (pid's are null, therefore root) are usernames, and the underlying ones are prior years of tickets they had. This all works perfectly -- top tabs are their names, and when they click on them, the "current year" of tickets as well as any tickets that are still open are shown (even if they're from prior years). If they want to look at past years, they'd just click on the tab that represents that year number. Each click event fires off a re-bind for the RadGrid below.

All works fine, except for this one problem - once a tab is active, if a user clicks that same tab again, I don't get another click event firing. I'd like to use this re-click as a "refresh" event (meaning the datagrid would re-query the underlying datasource to get up to the minute results).

In the attached picture, if a user selects the first tab (ChCurrier), then selects 2022 to look at last year's tickets, there is no way for him to then re-select the current year's tickets by clicking on ChCurrier again - the click event won't fire because it's already active/selected.

 

 
Rumen
Telerik team
commented on 25 May 2023, 10:16 AM

I am glad that you found the solution! Yes, the ClickSelectedTab property indicates whether the tabstrip should postback when the user clicks the currently selected tab.
Richard
Top achievements
Rank 1
Iron
commented on 25 May 2023, 10:22 AM

Thanks Rumen, I'm glad I found it as well. This solves a great UI problem for us, and it just makes it so much easier for the user to conceptualize.

1 Answer, 1 is accepted

Sort by
1
Accepted
Richard
Top achievements
Rank 1
Iron
answered on 25 May 2023, 10:03 AM
I can't believe I missed this, but I solved my own problem -- the setting ClickSelectedTab needs to be set to true, and then it will re-fire off any tab clicks even on active tabs! Love it when the problem is this easy to solve ha
Tags
TabStrip
Asked by
Richard
Top achievements
Rank 1
Iron
Answers by
Richard
Top achievements
Rank 1
Iron
Share this question
or