public override void BreakLinksToControl(bool unwireEventsOnly)
 {
     if (this.criteriaEdit != null)
     {
         ICallbackManagerHolder page = this.criteriaEdit.Page as ICallbackManagerHolder;
         if (page != null)
         {
             page.CallbackManager.PreRenderInternal -= new EventHandler <EventArgs>(this.CallbackManager_PreRenderInternal);
         }
         foreach (IDisposable disposable in this.disposablePropertyEditors)
         {
             disposable.Dispose();
         }
         this.disposablePropertyEditors.Clear();
         this.valueParsers.Clear();
         this.criteriaEdit.Columns.Clear();
         this.criteriaEdit.ParseValue                       -= new FilterControlParseValueEventHandler(this.criteriaEdit_ParseValue);
         this.criteriaEdit.PreRender                        -= new EventHandler(this.criteriaEdit_PreRender);
         this.criteriaEdit.Load                             -= new EventHandler(this.criteriaEdit_Load);
         this.criteriaEdit.CustomValueDisplayText           -= new FilterControlCustomValueDisplayTextEventHandler(this.criteriaEdit_CustomValueDisplayText);
         this.criteriaEdit.Model.CreateCriteriaParseContext -= new EventHandler <CreateCriteriaParseContextEventArgs>(this.Model_CreateCriteriaParseContext);
         if (!unwireEventsOnly)
         {
             this.criteriaEdit = null;
         }
     }
     base.BreakLinksToControl(unwireEventsOnly);
 }
 private void CreateFilterControl()
 {
     this.criteriaEdit                          = new ASPxFilterControl();
     this.criteriaEdit.Width                    = Unit.Percentage(100.0);
     this.criteriaEdit.ParseValue              += this.criteriaEdit_ParseValue;
     this.criteriaEdit.PreRender               += this.criteriaEdit_PreRender;
     this.criteriaEdit.CustomValueDisplayText  += this.criteriaEdit_CustomValueDisplayText;
     this.criteriaEdit.EnablePopupMenuScrolling = true;
     DevExpress.ExpressApp.Web.RenderHelper.SetupASPxWebControl(this.criteriaEdit);
     this.criteriaEdit.BeforeGetCallbackResult += this.criteriaEdit_BeforeGetCallbackResult;
     this.criteriaEdit.Load += this.criteriaEdit_Load;
     this.criteriaEdit.Model.CreateCriteriaParseContext += this.Model_CreateCriteriaParseContext;
 }