DataGridViewCellCollection.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在指定地點取得或設置物品。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。
多載
| 名稱 | Description |
|---|---|
| Item[Int32] |
取得或設定格子到所提供的索引位置。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。 |
| Item[String] |
取得或設定欄位中以所提供名稱的儲存格。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。 |
Item[Int32]
取得或設定格子到所提供的索引位置。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。
public:
property System::Windows::Forms::DataGridViewCell ^ default[int] { System::Windows::Forms::DataGridViewCell ^ get(int index); void set(int index, System::Windows::Forms::DataGridViewCell ^ value); };
public System.Windows.Forms.DataGridViewCell this[int index] { get; set; }
member this.Item(int) : System.Windows.Forms.DataGridViewCell with get, set
Default Public Property Item(index As Integer) As DataGridViewCell
參數
- index
- Int32
要取得或設定的格子的零基指數。
屬性值
它們 DataGridViewCell 會儲存在給定的索引上。
例外狀況
設定此屬性時指定的值為 null。
另請參閱
適用於
Item[String]
取得或設定欄位中以所提供名稱的儲存格。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。
public:
property System::Windows::Forms::DataGridViewCell ^ default[System::String ^] { System::Windows::Forms::DataGridViewCell ^ get(System::String ^ columnName); void set(System::String ^ columnName, System::Windows::Forms::DataGridViewCell ^ value); };
public System.Windows.Forms.DataGridViewCell this[string columnName] { get; set; }
member this.Item(string) : System.Windows.Forms.DataGridViewCell with get, set
Default Public Property Item(columnName As String) As DataGridViewCell
參數
- columnName
- String
欄位名稱,用來取得或設定儲存格。
屬性值
它們 DataGridViewCell 會儲存在與名字相關的欄位中。
例外狀況
columnName 與控制中任何欄位名稱不符。
設定此屬性時指定的值為 null。