Skip to main content
.NET Framework 4.5.2+

SingleChoiceAction.FindItemByCaptionPath(String) Method

Provides access to the SingleChoiceAction‘s ChoiceActionItem with the specified caption path.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v23.1.dll

NuGet Package: DevExpress.ExpressApp


public ChoiceActionItem FindItemByCaptionPath(
    string captionPath


Name Type Description
captionPath String

A string that represents the full caption path to the required ChoiceActionItem.


Type Description

A ChoiceActionItem with the specified caption path.


Each item of a Choice Action has a caption path associated with it. This path is represented by a sequence of parent item captions separated by the slash character. Use the FindItemByCaptionPath method to access a particular item by specifying the path associated with it. If an item with the specified path is not found, this method returns null (Nothing in VB). To retrieve the caption path of a Choice Action Item, use the ChoiceActionItem.GetCaptionPath method.

The following snippet illustrates how to disable the SetTaskAction Action’s “Priority/High” item when the current user is “John”.

ChoiceActionItem priorityHighItem = SetTaskAction.FindItemByCaptionPath("Priority/High");
if (priorityHighItem != null) 
        "SecurityAllowance", SecuritySystem.CurrentUserName != "John");


Alternatively, you can use the SingleChoiceAction.FindItemByIdPath Method, to find a specific item by its ID path.

See Also