The cspbShowSection function is used to expand and/or collapse PanelBar sections.

Parameters

GroupCaption
The Caption of the Group. The JavaScript escape character, back-slash (\), should be used in front of a single-quote (\'), double-qoute (\") or back-slash (\\) if these characters are present in the Caption value.

Return Value

none

Remarks

The function can also be used any other time you want to control the expand/collapse behavior of the PanelBar at the client.

When the DisplayMode property is SingleGroupCalculatedHeight or SingleGroupContentHeight, the a single parameter is sent into the function which in turn expands the Group specified by the parameter and collapses any other Group.

When the DisplayMode property is MultiGroupContentHeight, then any number of parameters can be sent into the function to expand and/or collapse multiple groups with one invocation. Whether the specified Groups' will expand or collapse is dependant upon their current state.

Example

The following code demonstrates how to invoke cspbShowSection from the page's Load event.

[HTML]

<body onload="cspbShowSection('My Group');">

[ASP / ASP.NET]

<body onload="<%Response.Write(PanelBar.GenerateOnLoadEvent())%>">

[JavaScript]

<SCRIPT>
  window.load=MyLoadEventHandler;

  function MyLoadEventHandler()
  {
    // Server-side method
    <%Response.Write(PanelBar.GenerateOnLoadEvent())%>;

    // Client-side method
    cspbShowSection('My Group');
  }
</SCRIPT>

		

Copyright © Coalesys, Inc.