Click here to Skip to main content
15,901,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As the question says, i'm having troubles with a 7 tab tabcontrol. Which might get you confused.
i have 7 tabs, from Test1 to Test7, and i want to display the data refered to "Test1" only if the tab with the text "Test1" matches the database value and so on...


Any help would be apreciated :)

What I have tried:

Tryied to use ints to identify the id of the companies and then call them on a if statement where tabcontrol1.TabIndex= SomeValue which somevalue is from 0 to 6 , but unsucessfuly.
Posted
Comments
Jawad Ahmed Tanoli 16-Feb-16 6:36am    
question is not clear what you want to do on tabPage click want to get text of tabpage?
Scribling Doodle 16-Feb-16 6:46am    
as i wrote i want to retrieve data which contains the word on the tabcontrol text. No matter what its writen. For example, i click on a tab that has Eleven, it will show all the rows that contains Eleven on a certain column.

1 solution

C#
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
       {
          string selectedTabText= tabControl1.SelectedTab.Text;
//apply in where clause 

       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900