SetDynamicEnabled - cWebBaseDEO

Enables or disables a control with a data binding according to rules built into the framework and the data binding's data dictionary

Type: Procedure

Parameters: None

Syntax
Procedure SetDynamicEnabled 

Call: Send SetDynamicEnabled


Description

A data entry object (DEO) with a data binding is 'refreshed' after each database operation in its server DataDictionary object (DDO), e.g., Save, Clear, Delete, Find. During this refresh procedure, each DEO is checked to see if it should be enabled or disabled. It does this by calling SetDynamicEnabled.

The framework performs a sophisticated analysis of the DEO's Server, binding table/column, view style of the host view (peWebViewStyle), read only state (IsViewReadOnly) and other information to decide if the DEO should be disabled. It then WebSets pbEnabled as needed to enable/disable the control. Note that if the DEO's pbEnabled property has been explicitly set to False, then SetDynamicEnabled is not executed.

Since SetDynamicEnabled is designed to be triggered by the DEO Refresh process, you would not normally send this message explicitly.

Normally you can disable the automatic enabling/disabling of a DEO by setting the pbEnabledStatic property. In most cases, this will handle your needs. If you need more control, you can augment or override SetDynamicEnabled in a DEO to: disable automatic enabling/disabling, modify the rules that determine whether a control is enabled/disabled, or modify how a dynamically disabled control will appear. Note that SetDynamicEnabled is always called - even when pbEnabledStatic is True (when True, the method does nothing and returns).