Issue with selecting tab and visability

Basically i want to do a wizard like screen but unlike your example it only shows the tabs available for you at that time. I have 5 tabs and a max of 3 will be visable based on selections in earlier tabs. I also use @ref so i can access each tab.

The issue i have hit is that if i use the "Visible" attribute on the Tab also setting the selection in code to that tab fails till the first render after the tab is made visable. I also can't seem to find a way to set a TabItem as Selected. The closest thing i have found to that is the following code that goes though the Items on the tab control and excludes the non visable ones and then finds the index to then set the selected Tab. No idea why i can't just pass the tab i want selected. This only seems to work if the tab is already visable as stated above.

Can i see a working example of something like this where there are 5 tabs but starts with only one visable and based on button you click on first tab other tabs become visable and selected. I need razor for the content of the tabs as they are not basic tabs so just adding new tabs with a string as there content would not work.


3 Replies 1 reply marked as answer

NR Nevitha Ravi Syncfusion Team February 17, 2021 11:51 AM UTC

Hi Chris, 

Greetings from Syncfusion Support. 

We have prepared a sample for your requirement ‘starts only one tab as visible and other tab become visible and selected dynamically’ using Visible property and two way binding of SelectedItem, which can be downloaded from the following link. 

Please try the sample and let us know if you need any further assistance. 

Regards, 
Nevitha 


Marked as answer

CH Chris February 19, 2021 04:17 AM UTC

Thanks.


NR Nevitha Ravi Syncfusion Team February 19, 2021 05:55 AM UTC

Hi Chris, 

You are most welcome..! please get back to us if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon