ASPxPanel Class
Represents a panel control that acts as a container for other controls.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public class ASPxPanel :
ASPxCollapsiblePanel
#Remarks
The ASPxPanel control is a container area for other controls. It is useful when you want to generate controls programmatically, hide/show a group of controls, etc. You can populate the ASPxPanel with other controls using the ASPxPanelContainerBase.Controls property and the PanelContent control.
#Create a Panel
#Design Time
The ASPxPanel control is available on the DX.24.2: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.
Drag the control onto a form and customize the control’s settings, or paste the control markup in the page’s source code.
<dx:ASPxPanel ID="TopPanel" runat="server" Collapsible="true"
FixedPosition="WindowTop" ClientInstanceName="ClientPanel">
<SettingsAdaptivity CollapseAtWindowInnerWidth="624" />
<PanelCollection>
<dx:PanelContent runat="server">
<dx:ASPxMenu ID="HeaderMenu" runat="server">
<Items>
<dx:MenuItem Text="Data"></dx:MenuItem>
<dx:MenuItem Text="Settings"></dx:MenuItem>
<dx:MenuItem Text="Profile"></dx:MenuItem>
<dx:MenuItem Text="Help"></dx:MenuItem>
</Items>
</dx:ASPxMenu>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxPanel>
#Run Time
using DevExpress.Web;
using MenuItem = DevExpress.Web.MenuItem;
...
protected void Page_Load(object sender, EventArgs e) {
ASPxPanel panel = new ASPxPanel();
panel.ID = "TopPanel";
panel.ClientInstanceName = "ClientPanel";
panel.FixedPosition = PanelFixedPosition.WindowTop;
panel.Collapsible = true;
panel.SettingsAdaptivity.CollapseAtWindowInnerWidth = 624;
ASPxMenu menu = new ASPxMenu();
menu.ID = "HeaderMenu";
menu.Items.AddRange(new List<MenuItem>() {
new MenuItem("Data"),
new MenuItem("Settings"),
new MenuItem("Profile"),
new MenuItem("Help")
});
panel.Controls.Add(menu);
Page.Form.Controls.Add(panel);
}
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.
The ASPxPanel control inherits all its functionality from the base ASPxPanelBase class. This functionality enables the panel’s child controls to be manipulated (ASPxPanelContainerBase.Controls), the panel’s default button to be specified (ASPxPanelBase.DefaultButton), the panel’s initial visibility on the client to be defined (ASPxPanelBase.ClientVisible) etc. In addition, the ASPxPanel class implements the ASPxCollapsiblePanel.RenderMode property that allows you to specify how the panel should be rendered into the page.
Note
The ASPx
- The control’s client-side equivalent is represented by the ASPx
Client object.Panel - On the client side, the client object can be accessed directly by the name specified via the ASPx
Panel property.Base. Client Instance Name - The available client events can be accessed by using the ASPx
Panel. property.Client Side Events
The control’s client-side API is enabled if the ASPx