DataGridView.DataGridViewControlCollection.Insert Method (Int32, Control)

 

Inserts the specified Control into the DataGridView.DataGridViewControlCollection at the specified index.

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

public void Insert(
	int index,
	Control value
)

Parameters

index
Type: System.Int32

The zero-based index at which to insert value.

value
Type: System.Windows.Forms.Control

The Control to insert into the DataGridView.DataGridViewControlCollection.

Exception Condition
ArgumentOutOfRangeException

index is less than zero or greater than or equal to the current number of controls in the DataGridView.DataGridViewControlCollection.

.NET Framework
Available since 2.0
Return to top
Show: