Visual Basic: DataGrid Control

Visual Studio 6.0

AllowFocus Property

See Also   Example   Applies To

Sets or returns a value that determines whether cells within a split can receive focus.


object.AllowFocus [= value]

The AllowFocus property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A Boolean expression that determines whether a cell receives focus, as described in Settings.


The settings for value are:

Setting Description
True (Default) The user will be able to interactively select the split, giving it focus.
False The user will not be able to interactively select the split. When clicked on, the split will not receive focus and the control that previously had focus will retain it.


Use this property in combination with the AllowSizing property to completely prohibit the user from making any changes to a split (by setting both properties to False). Unselectable splits are passed over when TabAcrossSplits is set to True.