[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Design.Designer.QueryActionEnabled

QueryActionEnabled Method

QueryActionEnabled(DesignerAction)

Checks whether a specific designer action is currently enabled.

Declaration
public bool QueryActionEnabled(DesignerAction action)
Parameters
Type Name Description
DesignerAction action

The DesignerAction to check. This parameter identifies the specific action whose enabled state is being queried.

Returns
Type Description
bool
<code>true</code> if the specified action is enabled and can be executed; otherwise, <code>false</code>. The return value reflects the action's current 

availability within the designer environment.

Remarks

This method is utilized to determine the availability of actions within the designer, such as commands related to editing, formatting, or other design-time operations. An action being enabled implies that it is available for use under the current state of the designer.

Examples

This example shows how to determine if the "Convert to Master" action is enabled for the current report loaded in the designer.

// Assuming 'designer' is an instance of the Designer class.
var canConvert = designer.QueryActionEnabled(DesignerAction.ConvertToMaster);
// The 'canConvert' value will be 'false' for master reports and 'true' for RDLX reports.
// Use this information to enable/disable UI elements or to inform the user.