SingleChoiceAction.FindItemByIdPath(String) Method
Provides access to the SingleChoiceAction‘s ChoiceActionItem with the specified identifier path.
Namespace: DevExpress.ExpressApp.Actions
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Parameters
Name | Type | Description |
---|---|---|
idPath | String | A string that represents the full identifier path to the required ChoiceActionItem. |
Returns
Type | Description |
---|---|
ChoiceActionItem | A ChoiceActionItem with the specified identifier path. |
Remarks
Each item of a Choice Action has an identifier path associated with it. This path is represented by a sequence of parent item identifiers separated by the slash character. Use the FindItemByIdPath 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 identifier path of a Choice Action Item, use the ChoiceActionItem.GetIdPath method.
The following snippet illustrates how to disable the SetTaskAction Action’s “Priority/High” item, when the current user is “John”.
ChoiceActionItem priorityHighItem = SetTaskAction.FindItemByIdPath("Priority/High");
if (priorityHighItem != null)
priorityHighItem.Enabled.SetItemValue(
"SecurityAllowance", SecuritySystem.CurrentUserName != "John");
Alternatively, you can use the SingleChoiceAction.FindItemByCaptionPath method to find a specific item by its caption path.