Page 1 of 1

Sub-tab forward button

Posted: 18 Apr 2020
by MP_FD
Hello,

I have two main tabs "A" and "B" (parent tabs) and two more child-tabs under "A".

I know this OnClick property to move to next parent tab, but it doesn't work with subtabs.
var currentTab = fd.tabControl(0).tabs('option', 'active');
fd.tabControl(0).tabs('option', 'active', currentTab + 1);
But I would like to set an "OnClick" function button to move to next subtab section (from subtab A (1) to subtab A (2)... Is it possible?
Or even to set such button to move forward to a specific tab or subtab.

Any suggestion?

Thank you!

Re: Sub-tab forward button

Posted: 21 Apr 2020
by mnikitina
Hello MP_FD,

fd.tabControl() holds the index of tab control on the form. The Parent Tab index is 0, the Child Tab index is 1.

To switch the tab index of the child tab control the code should look like this:

Code: Select all

var currentTab = fd.tabControl(1).tabs('option', 'active');
fd.tabControl(1).tabs('option', 'active', currentTab + 1);

Re: Sub-tab forward button

Posted: 22 Apr 2020
by MP_FD
Thank you!