DataGridViewEditingControlShowingEventArgs.Control Property

The control shown to the user for editing the selected cell's value.

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

member Control : Control with get

Property Value

Type: System.Windows.Forms.Control
A Control that displays an area for the user to enter or change the selected cell's value.

To customize the display characteristics of the control, set the properties of the object returned by the CellStyle property rather than setting the properties of the control returned by the Control property.

The following code example illustrates the use of this property. In the example, a DataGridView.EditingControlShowing event handler adds a handler for a DataGridViewComboBoxEditingControl event. The editing control is cast to a ComboBox to handle the ComboBox.SelectedIndexChanged event.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft