ASPxRoundPanel.HeaderTemplate Property
Gets or sets a template used to display the content of the round panel’s header.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.2.dll
Declaration
Property Value
Type |
Default |
Description |
ITemplate |
*null* |
An object that supports the System.Web.UI.ITemplate interface and contains a template used to display the panel’s header.
|
Note
Once a template defined via the HeaderTemplate property is created within a control, it is instantiated within a container object of the RoundPanelHeaderTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.
Example
The complete sample project is available in the DevExpress Code Central database at E143.
function OnExpandCollapseButtonClick(s, e) {
var isVisible = ContentPanel.GetClientVisible();
s.SetText(isVisible ? "+" : "-");
ContentPanel.SetClientVisible(!isVisible);
}
...
<dxe:ASPxButton ID="btnShowHide" runat="server"
Text="Show / Hide" AllowFocus="False" AutoPostBack="False">
<ClientSideEvents Click="function(s, e)
{ RoundPanel.SetClientVisible(!RoundPanel.GetClientVisible()); }" />
</dxe:ASPxButton>
<br/>
<dxrp:ASPxRoundPanel ID="rpRoundPanel" runat="server" Width="200px"
ClientInstanceName="RoundPanel" HorizontalAlign="Justify">
<HeaderTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td style="white-space: nowrap;">
Collapsible Round Panel
</td>
<td style="width: 1%; padding-left: 5px;">
<dxe:ASPxButton ID="btnExpandCollapse" runat="server" Text="-"
AllowFocus="False" AutoPostBack="False" Width="20px">
<Paddings Padding="1px" />
<FocusRectPaddings Padding="0" />
<ClientSideEvents Click="OnExpandCollapseButtonClick" />
</dxe:ASPxButton>
</td>
</tr>
</table>
</HeaderTemplate>
<PanelCollection>
<dxp:PanelContent runat="server">
<dxp:ASPxPanel ID="pnlContent" runat="server" Width="100%"
ClientInstanceName="ContentPanel">
<PanelCollection>
<dxp:PanelContent runat="server">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Morbi vel ante congue ligula
blandit rhoncus. Mauris tellus augue, viverra euismod,
facilisis at, vestibulum sed, risus.
Vivamus lobortis ultricies erat.
</dxp:PanelContent>
</PanelCollection>
</dxp:ASPxPanel>
</dxp:PanelContent>
</PanelCollection>
</dxrp:ASPxRoundPanel>
...
See Also