Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ActionBase.SelectionDependencyType Property

Specifies a context for enabling an Action.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

[DefaultValue(SelectionDependencyType.Independent)]
public SelectionDependencyType SelectionDependencyType { get; set; }

#Property Value

Type Default Description
SelectionDependencyType Independent

A SelectionDependencyType enumeration value identifying a context type.

Available values:

Name Description
Independent

An Action does not require objects to be selected.

RequireSingleObject

An Action is available when a single object is selected.

RequireMultipleObjects

An Action is available when one or more objects are selected.

#Remarks

Use this property to make the current Action dependent on whether a single object or multiple objects are selected in the current View.

If the SelectionDependencyType property is set to RequireSingleObject, you can set the ActionBase.Category property to “RecordEdit”, to display the Action in an additional cell for each object in the ASP.NET Web Forms application’s List Views.

Note

The Action is hidden if the selection context is not available (for example, when the Controller is not derived from ViewController).

You can set another value in the Controller’s constructor or Designer. This value is saved to the Application Model‘s ActionDesign | Actions | <Action> node. You can change this value in the Model Editor. In a UI, the value which is specified in the Application Model’s .xafml file that was loaded last, will be displayed. For information on the order of Application Model differences loading, refer to the Application Model Basics topic.

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

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.

See Also