/// <summary> /// Prepares the page control hierarchy. /// </summary> protected override void OnInit(EventArgs e) { base.OnInit(e); this.BlockCustomFields = true; this.SearchResultTable.CanExport = false; this.SearchResultTable.CanPrint = false; this.SearchResultTable.CanSearch = false; this.SearchResultTable.ClientSideRefresh = UserInterface.ConfigurableBoolean.False; PopupSearch master = this.Master as PopupSearch; if (master != null) { if (this.Buttons == PopupButtons.Clear || this.Buttons == PopupButtons.Both) { HtmlGenericControl clear = new HtmlGenericControl("button"); clear = this.CreateButton("delete", "Clear", "danger", true, "icon-white", "closePopup('clear'); return false;"); master.PopupButtons.Controls.Add(clear); } if (this.Buttons == PopupButtons.Cancel || this.Buttons == PopupButtons.Both) { HtmlGenericControl cancel = new HtmlGenericControl("button"); cancel = this.CreateButton("delete_sign", "Cancel", "warning", true, "icon-white", "closePopup(); return false;"); master.PopupButtons.Controls.Add(cancel); } } }
/// <summary> /// Prepares the page for rendering. /// </summary> protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); this.Form.Attributes.Add("data-mode", "edit"); PopupSearch masterPage = this.Master as PopupSearch; if (masterPage != null) { masterPage.SearchResultPanel.Style[HtmlTextWriterStyle.Display] = this.HasSearchRan ? "block" : "none"; } }