Skip to main content

ASPxPopupControlBase.EnableHierarchyRecreation Property

Gets or sets a value that specifies whether the popup control enables its control hierarchy to be forcibly recreated, to apply the settings defined at runtime to its child controls.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public bool EnableHierarchyRecreation { get; set; }

Property Value

Type Default Description
Boolean true

true if the control’s hierarchy recreation is enabled; otherwise, false.


When you modify the control’s properties programmatically at runtime, the ViewState is utilized to remember the state change. Across a postback, the control hierarchy is recreated. After that, the page’s view state is applied.

If the control settings are modified, changing the child controls hierarchy, the hierarchy must be recreated again after the ViewState is loaded; otherwise, the control may function improperly.

Set the EnableHierarchyRecreation property to true, to forcibly recreate the control hierarchy after the ViewState is loaded (after a postback).


Set the EnableHierarchyRecreation property in a markup or at runtime, in the page’s Init event (before the ViewState is loaded).


The code sample below demonstrates how you can create a popup window at runtime. Note that in this case, the EnableHierarhyRecreation property should be set to true.

protected void MyButton_Click(object sender, EventArgs e) {
     PopupWindow Window = default(PopupWindow);
     string Name = "Window Name";
     string Text = "Window Content";
     int Index = MyPopupControl.Windows.IndexOfName(Name);
     if (Index < 0) {
          Window = new PopupWindow(Text, Name);
          Window.PopupElementID = "MyButton";
          Window.ShowOnPageLoad = true;
See Also