Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Tabs/Sections Javascript API

About Tabs/Sections API

Scroll Prev Next More

 

The Tabs/Sections API allows you to manage tabs and sections added to Add, Edit, and View pages.

 

All tab and tab group indexes are zero-based. 0 - the first tab, 1 -the  second tab, etc.

 
These methods work in the JavaScript OnLoad event on the Add/Edit/View pages.

Methods

Method

Description

getTabs( [n] )

Returns the RunnerTabs object, which represents a single tab group.

Tabs methods

count()

Returns the number of tabs in the Tab control object.

activate( n )

Activates/shows the n-th tab.

activeIdx()

Gets an index of the currently selected tab.

hide( n )

Hides the n-th tab (zero-based).

show( n )

Shows the n-th tab (zero-based).

disable( n )

Makes the n-th tab disabled.

enable( n )

Makes the n-th tab enabled.

headerElement( n )

Returns the jQuery object of the tab header.

bodyElement( n )

Returns the jQuery object of the tab content.

addTab(headerHtml, paneHtml)

Creates a new tab and adds it to the end of a tab group.

moveTo(n, m)

Changes the order of the tabs. The n-th tab is moved to m-th position. The m-th tab is moved to the n-th position.

Sections methods

getSectionCount()

Returns the number of sections on the page.

getSection( n )

Returns the RunnerSection object representing the n-th section on the page (zero-based).

headerElement()

Returns the jQuery object of the section header.

bodyElement()

Returns the jQuery object of the section content.

expand()

Expands the section.

collapse()

Collapses the section.

 

To hide and show sections you can use the standard ASPRunner.NET functions that show/hide objects. To hide a section from the server side event use hideItem() function. To show or hide a section in the run time, use toggleItem() function.

See also:

Page designer. Working with table pages

About Grid Row JavaScript API

Choose pages elements

About RunnerPage class