DataGridViewComboBoxCell.InitializeEditingControl Method (Int32, Object, DataGridViewCellStyle)

 

Attaches and initializes the hosted editing control.

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

public override void InitializeEditingControl(
	int rowIndex,
	object initialFormattedValue,
	DataGridViewCellStyle dataGridViewCellStyle
)

Parameters

rowIndex
Type: System.Int32

The index of the cell's parent row.

initialFormattedValue
Type: System.Object

The initial value to be displayed in the control.

dataGridViewCellStyle
Type: System.Windows.Forms.DataGridViewCellStyle

A DataGridViewCellStyle that determines the appearance of the hosted control.

The InitializeEditingControl method initializes the hosted ComboBox control as described in the base DataGridViewCell.InitializeEditingControl method. In addition, for every invocation, InitializeEditingControl does the following:

This method also adjusts the cell's dimensions to accommodate the hosted ComboBox control.

.NET Framework
Available since 2.0
Return to top
Show: