BeforePropertiesDialog Event
Active Query Builder 2 .NET Edition reference
BeforePropertiesDialog Event
Example 



Invoked before any of the properties dialogs (Sub-query, DataSource, Link properties) is shown.
Syntax
'Declaration
 
Public Event BeforePropertiesDialog As BeforePropertiesDialogEventHandler
'Usage
 
Dim instance As QueryBuilder
Dim handler As BeforePropertiesDialogEventHandler
 
AddHandler instance.BeforePropertiesDialog, handler
public event BeforePropertiesDialogEventHandler BeforePropertiesDialog
public: __event BeforePropertiesDialogEventHandler* BeforePropertiesDialog
Remarks

The controlOwner parameter can be one of the following:
- UnionSubQuery in case of showing the Query Properties dialog;
- Link in case of showing the Link Properties gialog;
- DataSourceObject in case of showing the DataSource Properties dialog.

Displaying of the dialog may be aborted by setting the the abort parameter to true.

Example
private void queryBuilder1_BeforePropertiesDialog(QueryBuilder sender, ControlOwner controlOwner, ref bool abort)
{
    String msg = "";
 
    if (controlOwner is UnionSubQuery) // Query Properties dialog (invoked from the design pane context menu)
    {
        msg = "Do you want to show Query Properties dialog?";
    }
    else if (controlOwner is Link) // Link Properties dialog (invoked from the link context menu)
    {
        msg = "Do you want to show Link Properties dialog?";
    }
    else if (controlOwner is DataSourceObject) // Datasource Properties dialog (invoked from the datasource context menu)
    {
        msg = "Do you want to show Datasource Properties dialog?";
    }
 
    if (!String.IsNullOrEmpty(msg))
    {
        if (MessageBox.Show(msg, "BeforePropertiesDialog event handler", MessageBoxButtons.YesNo) == DialogResult.No)
        {
            abort = true;
        }
    }
}
See Also

Reference

QueryBuilder Class
QueryBuilder Members
AfterPropertiesDialog Event

 

 


© Copyright 2005-2012 ActiveDBSoft. All rights reserved.

Send Feedback