Skip to main content
.NET Standard 2.0+

ParametrizedAction Class

Represents a Parametrized Action.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v22.1.dll

Declaration

[ToolboxTabName("DX.22.1: XAF Actions")]
public class ParametrizedAction :
    ActionBase

Remarks

The ParametrizedAction class inherits the basic functionality of Actions from the ActionBase class. Parametrized Actions are used to execute custom code, when an end-user enters a value into the Action’s editor. This value is accessed via the ParametrizedAction.Value property. By default, this value is of the string type. You can specify another type for entered values via the ParametrizedAction.ValueType property (integer or DateTime). For each type, the appropriate control is displayed for the Action.

Note

For some types of a Parametrized Action’s values, Action Containers cannot create an appropriate control. In this instance, you will have to implement a special Action Container.

To execute custom code when users input a value into the Action’s editor, handle the ParametrizedAction.Execute event. To access the entered value, use the handler’s ParametrizedActionExecuteEventArgs.ParameterCurrentValue parameter.

To add a Parametrized Action to a Controller, drag and drop the ParametrizedAction item from the Toolbox (the XAF Actions section) onto the Controller’s Designer area (see Add a Parametrized Action).

Note

CodeRush allows you to add Actions and Controllers with a few keystrokes. To learn about the Code Templates for XAF, refer to the following help topic: XAF Templates.

Set the IModelActionWeb.IsPostBackRequired property to true to send a postback when a user executes an Action in an ASP.NET Web Forms application. For example, for Actions that download files or change the application’s language.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ParametrizedAction class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

Inheritance

See Also