DataGridViewSelectedColumnCollection.Insert(Int32, DataGridViewColumn) 方法

定义

将列插入到集合中的指定位置。Inserts a column into the collection at the specified position.

public:
 void Insert(int index, System::Windows::Forms::DataGridViewColumn ^ dataGridViewColumn);
public void Insert (int index, System.Windows.Forms.DataGridViewColumn dataGridViewColumn);
member this.Insert : int * System.Windows.Forms.DataGridViewColumn -> unit

参数

index
Int32

从零开始的索引,应在该位置插入列。The zero-based index at which the column should be inserted.

异常

始终引发。Always thrown.

注解

此方法与此类无关。This method is not relevant for this class. 不能直接更改DataGridViewSelectedColumnCollection类。You cannot change the DataGridViewSelectedColumnCollection class directly. 若要在DataGridViewSelectedColumnCollection中插入列, 请DataGridViewBand.Selected使用属性。To insert a column into the DataGridViewSelectedColumnCollection, use the DataGridViewBand.Selected property.

适用于

另请参阅