Call tabBarPage2 when clicking button

Hi Good day,

I have tabBarPage1, tabBarPage2, when windows form will show by default it shows tabBarPage1.

What I want to do is that, when I click a button my tab page will change and should call tabBarPage2.

it this possible?

thank you

3 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team September 8, 2020 07:25 AM UTC

Hi Mark 
 
Query : What I want to do is that, when I click a button my tab page will change and should call tabBarPage2. 
 
Thank you for contacting Syncfusion Support. 
 
We have checked the reported requirement , that you want to change the selection of default tabpage to some other page at runtime. To achieve this requirement , you can use ActivePageIndex property of TabSplitterControl, by assigning the desired index of tabpage. 
 
Code :[C#] 
 
 
private void button1_Click(object sender, EventArgs e) 
{ 
//Changing selection of TabPages 
tabBarSplitterControl1.ActivePageIndex = 1; 
} 
 
 
 
 
Screenshot: 
 
On startup of application: 
 
 
 
 
After clicking Button : 
 
 
 
 
Please try this solution and let us know if it is helpful. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

MJ Mark Jayvee September 8, 2020 09:19 AM UTC

Thank you, this is what I am looking for.



VR Vijayalakshmi Roopkumar Syncfusion Team September 9, 2020 04:50 AM UTC

Hi Mark, 
 
Thank you for your update. 
 
We are glad that our solution has helped to achieve your requirement.  
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Vijayalakshmi VR. 


Loader.
Up arrow icon