Active Query Builder 2 .NET Edition reference
ControlDestroying Event

Invoked before the control is destroyed inside the component.
Public Event ControlDestroying As ControlDestroyingEventHandler
Dim instance As QueryBuilder
Dim handler As ControlDestroyingEventHandler
AddHandler instance.ControlDestroying, handler
public event ControlDestroyingEventHandler ControlDestroying
public: __event ControlDestroyingEventHandler* ControlDestroying
Use this event to free resources and unbound events created in the ControlCreated Event
Removes button at the top of each sub-query DataSource control created in the ControlCreated event handler.
private void queryBuilder1_ControlDestroying(ControlOwner owner, Control control)
    if (owner is DataSourceQuery && control is DataSourceControl)
        DataSourceControl dataSourceControl = (DataSourceControl) control;
        foreach (Control c in dataSourceControl.Controls)
            if (c is Button)
                // remove event handler to avoid memory leak
                c.Click -= customButton_Click;
See Also


QueryBuilder Class
QueryBuilder Members



© Copyright 2005-2012 ActiveDBSoft. All rights reserved.

Send Feedback