expressappframework-devexpress-dot-expressapp-dot-utils-dot-boollist-dot-setitemvalue-x28-system-dot-string-system-dot-boolean-x29.md
Assigns a new value to a particular key from the BoolList‘s collection of key/value pairs.
Namespace : DevExpress.ExpressApp.Utils
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public void SetItemValue(
string key,
bool value
)
Public Sub SetItemValue(
key As String,
value As Boolean
)
| Name | Type | Description |
|---|---|---|
| key | String |
A string representing the key from the BoolList ‘s collection of key/value pairs, to which a new value will be assigned.
| | value | Boolean |
A Boolean value to be assigned to the specified key.
|
If a key/value pair with the specified key does not exist, it is created.
The following code snippet illustrates use of the SetItemValue method:
BoolList mylist = new BoolList();
mylist.SetItemValue("myKey", true);
//myValue == true;
To get all keys from the BoolList ‘s collection of key/value pairs, use the BoolList.GetKeys method. To check whether a particular key exists, use the BoolList.Contains method.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetItemValue(String, Boolean) method.
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.
// exportController.ExportAction.Executing += ExportAction_Executing; // Uncomment this line and comment the next one to show the error when a user performs the forbidden action
exportController.ExportAction.Active.SetItemValue("Security", Application.GetSecurityStrategy().IsGranted(new ExportPermissionRequest(View.ObjectTypeInfo.Type)));
}
if (recordsNavigationController != null) {
recordsNavigationController.Active.SetItemValue("DashboardFiltering", false);
}
IRequestSecurity requestSecurity = (IRequestSecurity)Application.Security;
controller.Active.SetItemValue("Security",
requestSecurity.IsGranted(new ExportPermissionRequest()));
See Also