Free Trial Buy Now

Tab Control - Client-Side Functionality

Page 1
Page 2
Page 3
Page Content Sample
v
HTML code to be used as the active page's content:
Apply

Description

This example demonstrates how you can manipulate a page control programmatically on the client using enhanced client-side functionality. The client-side programmatic interface is available if the EnableClientSideAPI property is set to true or if there is a handler assigned to any client-side event.

The ASPxPageControl allows a page's content to be changed dynamically on the client side by using the SetTabContentHTML method. This is demonstrated by the SetActiveTabContent function which uses the GetActiveTab method to access the currently active page. (See JS code)

The ShowActiveTabContent function displays (in a specific text area) the HTML code which represents the active page's content. The content of the active page is obtained via the GetTabContentHTML method. (See JS code)

The ActiveTabChanged function represents the hander for the ActiveTabChanged event. The event's argument contains information on the active tab which is used to synchronize the value of the dropdown editor. (See ASPX and JS code)

A specific page can be activated by using the SetActiveTab method. In this demo, each page is identified using its server-side Name property. In order to obtain a specific page by its name on the client side, the GetTabByName method is used. (See JS code, the ChangeActiveTab function)

Note that an individual client object can be referenced either directly by its ID (for instance, by using the following code: ASPxPageControl1.GetActiveTab()) or by using the Get method of a common collection for our ASPx web controls (this can be useful when our web control is contained within a UserControl or MasterPage, that is when the resulting client ID is generated by a specific NamingContainer). The GetTabControl function demonstrates how to access a client tabControl object by means of our control collection. (See JS code)

Version: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress ASP.NET Controls ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.