TreeNodeBindingCollection.Item プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As TreeNodeBindingCollection Dim i As Integer Dim value As TreeNodeBinding value = instance(i) instance(i) = value
public: property TreeNodeBinding^ default [int] { TreeNodeBinding^ get (int i); void set (int i, TreeNodeBinding^ value); }
/** @property */ public TreeNodeBinding get_Item (int i) /** @property */ public void set_Item (int i, TreeNodeBinding value)
プロパティ値
TreeNodeBindingCollection 内の指定したインデックス位置にある TreeNodeBinding。

Item インデクサを使用して、配列表記で指定したインデックス位置 i にある TreeNodeBindingCollection オブジェクトから TreeNodeBinding オブジェクトにアクセスします。Item インデクサを使用して、直接、コレクション内の TreeNodeBinding オブジェクトを変更または置換できます。

Item インデクサを使用して TreeNodeBindingCollection オブジェクト内にある項目にアクセスするコード例を次に示します。第 3 レベルのノードの TreeNodeBinding オブジェクトがプログラムによって新しい値に更新されます。この例を正しく実行するには、このセクションの末尾にある XML データを Book.xml ファイルにコピーする必要があります。
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) ' Use the indexer to access the TreeNodeBinding object for ' the third-level nodes (index 2) and change the value of ' its TextField property to "Subject". BookTreeView.DataBindings(2).TextField = "Subject" End Sub </script> <html> <body> <form runat="server"> <h3>TreeNodeBindingCollection Indexer Example</h3> <asp:TreeView id="BookTreeView" DataSourceID="BookXmlDataSource" runat="server"> <DataBindings> <asp:TreeNodeBinding DataMember="Book" TextField="Title"/> <asp:TreeNodeBinding DataMember="Chapter" TextField="Heading"/> <asp:TreeNodeBinding DataMember="Section" TextField="Heading"/> </DataBindings> </asp:TreeView> <asp:XmlDataSource id="BookXmlDataSource" DataFile="Book.xml" runat="server"> </asp:XmlDataSource> </form> </body> </html>
<%@ Page Language="C#" %> <script runat="server"> void Page_Load(Object sender, EventArgs e) { // Use the indexer to access the TreeNodeBinding object for // the third-level nodes (index 2) and change the value of // its TextField property to "Subject". BookTreeView.DataBindings[2].TextField = "Subject"; } </script> <html> <body> <form runat="server"> <h3>TreeNodeBindingCollection Indexer Example</h3> <asp:TreeView id="BookTreeView" DataSourceID="BookXmlDataSource" runat="server"> <DataBindings> <asp:TreeNodeBinding DataMember="Book" TextField="Title"/> <asp:TreeNodeBinding DataMember="Chapter" TextField="Heading"/> <asp:TreeNodeBinding DataMember="Section" TextField="Heading"/> </DataBindings> </asp:TreeView> <asp:XmlDataSource id="BookXmlDataSource" DataFile="Book.xml" runat="server"> </asp:XmlDataSource> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTreeNodeBindingCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。

- TreeNodeBindingCollection.Item プロパティのページへのリンク