Automatically Disabling and Enabling Controls

By default, .NET Windows Forms controls are not disabled when they are bound to empty data tables. This can be confusing to the end user since an enabled control leads them to believe they can enter data.

To address this issue, MM .NET user interface controls automatically disable themselves when they are bound to empty data tables or data views. If you want to turn off this behavior, you can set a control's AutoSetEnabled property to false (the default is true). To turn this off for a particular control, select the control at design time, and in the Visual Studio Properties Window, change the setting to false.

This auto-set enabled feature is sensitive to user security settings. For example, if a control has been set to "read-only" or "no access" due to security for the current user, the auto-set enabled logic does not change the enabled state of the control.


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 09/03/05
Comment or report problem with topic