Skip to main content
All docs
V24.2

EnvironmentPolicy.SettingVariable Event

Fires when the DevExpress control attempts to set the value of the environment variable in the current process. Handle this event to allow or suppress the operation.

Namespace: DevExpress.Data.Utils

Assembly: DevExpress.Data.v24.2.dll

Declaration

public static event EventHandler<EnvironmentPolicy.SettingEnvironmentVariableRequestEventArgs> SettingVariable

Event Data

The SettingVariable event's data class is EnvironmentPolicy.SettingEnvironmentVariableRequestEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
Name Gets the environment variable name.
Target Gets the location where an environment variable is stored.
Value Gets or sets the value of the environment variable.

The event data class exposes the following methods:

Method Description
ToString() Returns a human-readable representation of the SettingEnvironmentVariableRequestEventArgs object.

Remarks

Use e.Name and e.Target event parameters to obtain the name and location of the environment variable. Use the e.Value event parameter to modify the variable value if necessary.

Use the e.Cancel event parameter to allow or suppress the operation.

Read the following topic for additional information: Environment Policy.

See Also