次の方法で共有


DataGridItemCollection.Item プロパティ

コレクション内の指定したインデックス位置の DataGridItem オブジェクトを取得します。

[C#] C# では、このプロパティは DataGridItemCollection クラスのインデクサになります。

Public Default ReadOnly Property Item( _
   ByVal index As Integer _) As DataGridItem
[C#]
public DataGridItem this[intindex] {get;}
[C++]
public: __property DataGridItem* get_Item(intindex);
[JScript]
returnValue = DataGridItemCollectionObject.Item(index);またはreturnValue = DataGridItemCollectionObject(index);

[JScript] JScript では、この型で定義されている既定のインデックス プロパティを使用することができます。しかし、独自のインデックス プロパティを明示的に定義することはできません。ただし、このクラスの expando 属性を指定すると、既定のインデックス プロパティが提供されます。提供されるインデックス プロパティの型は Object 型であり、インデックス型は String になります。

引数 [JScript]

  • index
    コレクションから取得する DataGridItem オブジェクトの 0 から始まるインデックス番号。

パラメータ [Visual Basic, C#, C++]

  • index
    コレクションから取得する DataGridItem オブジェクトの 0 から始まるインデックス番号。

プロパティ値

コレクション内の指定したインデックス位置の DataGridItem オブジェクト。

解説

このインデクサを使用して、配列表記で指定したインデックス位置にある DataGridItemCollection から DataGridItem オブジェクトを取得します。

必要条件

プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ

参照

DataGridItemCollection クラス | DataGridItemCollection メンバ | System.Web.UI.WebControls 名前空間 | DataGridItem