ASPxPopupControlBase.HeaderTemplate Property
Gets or sets a template used to display the default window‘s header.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.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 a window’s header. |
Remarks
Use the HeaderTemplate property to control the default window’s header. The template defined using this property replaces the window header - in particular, the image, text and close button displayed with the header.
Note that any style settings defined for the header via the ASPxPopupControl.HeaderStyle (PopupControlStyles.Header for ASPxDockPanel) property are still in effect for the window’s header, whose content is specified using the HeaderTemplate property.
Note
For ASPxPopupControl only:
If the ASPxPopupControl.Windows collection is not empty, the HeaderTemplate property is not in effect. In this case, a common header template for all popup windows from the ASPxPopupControl.Windows collection can be defined via the ASPxPopupControl.WindowHeaderTemplate property. An individual window’s header template can be specified by using the window’s PopupWindow.HeaderTemplate property.
Note
Once a template defined via the HeaderTemplate property is created within a control, it is instantiated within a container object of the PopupControlTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.
Online Example
Example
The ASPxPopupControl does not allow a developer to prevent a PopupControl from being hidden when the CloseButton is clicked based on a custom criteria. A possible solution for this limitation is to use templates. You should add a button to the PopupControl's HeaderTemplate container and decide whether a PopupControl should be closed or not when this button is clicked.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e) {
}
}