Main Menu
Knowledge Base
Product Registration
Log an Incident
Request a Feature
Search Incidents/Bug Reports


Search KB

Please note: In an effort to better serve you, we are in the process of restructuring DevCenter. In the process, we have moved many items that you may be used to finding in DevCenter over to the Main Site. If you are having trouble locating something, please try looking at the following places:

Knowledge Base Article: KB09987

HOWTO:Changing the header text of the WebPanel on the client side


The information in this article applies to:
ASP.NET (v5.3.20053, 6.1.20061, 6.2.20062),
WebMisc (v6.3.20063, 7.1.20071, 7.2.20072)
  Article Created: 
7/24/2006

Last Updated:
9/13/2007

Article Type
How To
  
Page Options
Average Rating:
4 out of 10

Rate this page
Print this page
E-mail this page
Add to Favorites

Summary

This article will show you how to change the header text of the WebPanel at run time on the client side.

Step-By-Step Example

Since there are no getText and setText methods on the client, changing the header text requires changing the header HTML element. This can be done using javascript in the WebPanel’s ExpandedStateChanged event:

In JavaScript:

function WebPanel1_ExpandedStateChanged(oWebPanel, oEvent)
{
    if (oWebPanel.getExpanded() == true)
        oWebPanel.getHeader()._element.childNodes[1].nodeValue = "expanded";
    else
        oWebPanel.getHeader()._element.childNodes[1].nodeValue = "collapsed";
}

Related Articles

HOWTO: How to change the position of the expansion indicator on a WebPanel (KB010100)

Samples

webpanelsample_cs.zip
 Changing the text of the WebPanel's header on the client


webpanelsample_vb.zip
 Changing the text of the WebPanel's header on the client



How would you rate the quality of this content?
Poor -----------------------------------------> Outstanding

Tell us why you rated the content this way. (optional)