DataGridViewRowCollection.Item[Int32] 屬性

定義

取得指定索引處的 DataGridViewRow

public:
 property System::Windows::Forms::DataGridViewRow ^ default[int] { System::Windows::Forms::DataGridViewRow ^ get(int index); };
public System.Windows.Forms.DataGridViewRow this[int index] { get; }
member this.Item(int) : System.Windows.Forms.DataGridViewRow
Default Public ReadOnly Property Item(index As Integer) As DataGridViewRow

參數

index
Int32

要取得的 DataGridViewRow 之以零起始的索引。

屬性值

指定之索引處的 DataGridViewRow。 以這個索引子存取 DataGridViewRow 會導致該資料列變為非共用。 若要讓該資料列保持共用,請使用 SharedRow(Int32) 方法。 如需詳細資訊,請參閱 縮放 Windows Form DataGridView 控制項的最佳做法

例外狀況

index 小於 0。

-或-

index 等於或大於 Count

適用於

另請參閱