DataGridViewCellCollection.Item[] Vlastnost

Definice

Získá nebo nastaví položku v zadaném umístění. V jazyce C# je tato vlastnost indexerem DataGridViewCellCollection pro třídu.

Přetížení

Item[Int32]

Získá nebo nastaví buňku v zadaném umístění indexu. V jazyce C# je tato vlastnost indexerem DataGridViewCellCollection pro třídu.

Item[String]

Získá nebo nastaví buňku ve sloupci se zadaným názvem. V jazyce C# je tato vlastnost indexerem DataGridViewCellCollection pro třídu.

Item[Int32]

Získá nebo nastaví buňku v zadaném umístění indexu. V jazyce C# je tato vlastnost indexerem DataGridViewCellCollection pro třídu.

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

Parametry

index
Int32

Index buňky založený na nule, který chcete získat nebo nastavit.

Hodnota vlastnosti

DataGridViewCell

Uložená DataGridViewCell v daném indexu.

Výjimky

Zadaná hodnota při nastavení této vlastnosti je null.

Zadaná buňka při nastavení této vlastnosti již patří do DataGridView ovládacího prvku.

-nebo- Zadaná buňka při nastavení této vlastnosti již patří do .DataGridViewRow

index je menší než 0.

-nebo- index je roven nebo větší než počet buněk v kolekci.

Viz také

Platí pro

Item[String]

Získá nebo nastaví buňku ve sloupci se zadaným názvem. V jazyce C# je tato vlastnost indexerem DataGridViewCellCollection pro třídu.

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

Parametry

columnName
String

Název sloupce, ve kterém chcete buňku získat nebo nastavit.

Hodnota vlastnosti

DataGridViewCell

Uložená DataGridViewCell ve sloupci s daným názvem.

Výjimky

columnName neodpovídá názvu žádných sloupců v ovládacím prvku.

Zadaná hodnota při nastavení této vlastnosti je null.

Zadaná buňka při nastavení této vlastnosti již patří do DataGridView ovládacího prvku.

-nebo- Zadaná buňka při nastavení této vlastnosti již patří do .DataGridViewRow

Viz také

Platí pro