Visual Basic: DataGrid Control

Button Property (Column Object)

See Also   Example   Applies To

Sets or returns a value that determines whether a button is displayed within the current cell.

Syntax

object**.Button** [**=**value]

The Button 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 if a button is displayed within the current cell, as described in Settings.

Settings

The settings for value are:

Setting Description
True A button will be displayed in the upper right corner of the current cell at run time.
False (Default) No button will be displayed.

Remarks

Typically, you enable the column button when you want to drop down a control (such as the built-in combo box, a bound list box, or even another DataGrid control) for editing or data entry. When the button in the current cell is clicked, the ButtonClick event will be fired. You can then write code to drop down the desired control from the cell.