NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGridColumn.KeyPress

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;

Parameters

rowNum
The row number.
keyData
A Keys which contains data about the key that was pressed.

Return Value

true if the key press has been handled and the grid should not process it any further; otherwise, false.

Remarks

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.

See Also

DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace