DataGridViewTextBoxEditingControl.ProcessKeyEventArgs Method (Message)


Processes key events.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override bool ProcessKeyEventArgs(
	ref Message m


Type: System.Windows.Forms.Message

A Message indicating the key that was pressed.

Return Value

Type: System.Boolean

true if the key event was handled by the editing control; otherwise, false.

This method ensures that the ENTER key is ignored so that carriage return and line feeds aren't stored in the cell value. This method also allows the cell contents to be selected when CTRL+A is pressed.


for immediate callers to use this method. Demand value: LinkDemand. Associated enumeration: UnmanagedCode.

.NET Framework
Available since 2.0
Return to top