Reliable way to identify clicked tab

Hi,

I want to load the tab's content dynamically, when a tab is clicked and to do that I need to identify which tab has been selected.

Currently I have two poor solutions :


  1. The TabEvents Selected that gives me the tab but the only way to know what IS the tab is to check the Header.Text property, which is far from ideal (not reliable enough)
  2. The SfTab.SelectedItem that gives the index of the selected tab, but index is also not reliable enough if I have some TabItem with dynamic Visible property (the index are not fixed as it depends on the number of visible tabs. Visible=false/true will change index).

So I'd like to have kind of ID property to set on TabItem to be sure I can clearly identify what tab has been clicked/selected.


KR,

Julien

1 Reply 1 reply marked as answer

SK Satheesh Kumar Balasubramanian Syncfusion Team April 21, 2022 03:11 PM UTC

Hi Julien,

 

We have already considered your request ‘provide ID support to TabItem’ as feature at our end which will be tracked through the following link. You can add your specifications (if any) and add your votes in the feedback to help us to provide the feature better.

 


The feature will be implemented in any of our upcoming volume releases. Until then we suggest you to maintain unique value in CssClass of each TabItem to achieve your request.

Regards,

Satheesh Kumar B


Marked as answer
Loader.
Up arrow icon