cancel
Showing results for 
Search instead for 
Did you mean: 

Switching tabs in a tabstrip

Former Member
0 Kudos

I have a tabstrip with two tabs. Under the first tab i am displaying a table. The user has the option of selecting one or more rows of this table, and hit an "Edit" button. At this time, the selected rows will be picked and transferred to a second table displayed under the next tab, and the user can make changes in this table. I am not sure how I can switch tabs programmatically. I searched the documentation but was not able to find much. Any guidance is appreciated.

Murtaza.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can switch tabs by binding the TabStrip.selectedTab property to a context attribute of type string and setting the context attribute value to the ID of the selected Tab.

Additional remark: Don't use tabstrips to visualize sequences of operation.

Armin

Message was edited by: Armin Reichert

Former Member
0 Kudos

Armin

Please can u help me, how to do programmatically. I am expecting the code.

Regards,

Davood.

Former Member
0 Kudos

Create a context attribute "selectedTab", type "String".

Bind TabStrip.selectedTab property to attribute "selectedTab".

In event handler, set attribute value to ID of tab to be selected:

wdContext.currentContextElement().setSelectedTab("ID-of-Tab");

Armin