DataGridViewSelectedCellCollection.Insert Method (Int32, DataGridViewCell)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Inserts a cell into the collection.

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

public void Insert(
	int index,
	DataGridViewCell dataGridViewCell
)

Parameters

index
Type: System.Int32

The index at which dataGridViewCell should be inserted.

dataGridViewCell
Type: System.Windows.Forms.DataGridViewCell

The object to be added to the DataGridViewSelectedCellCollection.

Exception Condition
NotSupportedException

Always thrown.

This method is not relevant for this class. You cannot change the DataGridViewSelectedCellCollection class directly. To add a cell to the DataGridViewSelectedCellCollection, use the DataGridViewCell.Selected property.

.NET Framework
Available since 2.0
Return to top
Show: