How to switch to next by button click ?

Hi, I have a question.

i want to switch tab by pushing the button, but i find the problem.

that problem's tab render by loop data.i can't fix ID tab one by one.

So that it did't work on used function  Widget_Click for control switch tab.

So I want to know " How to switch tab by button clicking the button. "

Regards.

Tharis.n

Hi,

While you create the tabs in a loop, can't you keep track of the Id of each tab in a list?

That way you could calculate the previous and next tab from your current tab position.

Regards,

Daniel

Hi Daniel,

Yes, i create tabs by loop and I set the ID of all tab by ID in data base follow first and second image.

By on the tabs have 2 position such as head and content.

and i uses the button control switch that I  did it follow final image.

But it not work.


While you create the tabs in a loop, can't you keep track of the Id of each tab in a list?

That way you could calculate the previous and next tab from your current tab position.

Regards,

Daniel



Solution

Why don't you use the Active Tab property on the Tabs widget for this?

1. Create a local parameter Active Tab, set it to the initial tab you want to display.

2. On the button click make the logic to set the Next tab as Active Tab, and do an Ajax Refresh of the Tab widget.

Solution

Hi Tharis,

In attachment you'll find an example of how to do this like Daniël explained.

Hope it helps!

Glenn

Daniël Kuhlmann wrote:

Why don't you use the Active Tab property on the Tabs widget for this?

1. Create a local parameter Active Tab, set it to the initial tab you want to display.

2. On the button click make the logic to set the Next tab as Active Tab, and do an Ajax Refresh of the Tab widget.

Hi Daniel,

I find the tool that you tell me, i didn't know before.

Thank you very much. :)

Regards,

Tharis