Provides a handler for determining which key was pressed, and whether to process it.
[Visual Basic] Overridable Public Function KeyPress( _ ByVal rowNum As Integer, _ ByVal keyData As Keys _ ) As Boolean [C#] public virtual bool KeyPress( int rowNum, Keys keyData ); [C++] public: virtual bool KeyPress( int rowNum, Keys keyData ); [JScript] public function KeyPress( rowNum : int, keyData : Keys ) : Boolean;
true if the key press has been handled and the grid should not process it any further; otherwise, false.
The KeyPress method allows you process keys for special behavior. For example, the overridden method found in DataGridBoolColumn toggles the column value whenever the space bar is pressed.
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace