TreeNodeBindingとは? わかりやすく解説

TreeNodeBinding クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

データ項目と、それが TreeView コントロール内でバインドしているノードとの関係を定義します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public NotInheritable Class
 TreeNodeBinding
    Implements IStateManager, ICloneable, IDataSourceViewSchemaAccessor
Dim instance As TreeNodeBinding
public sealed class TreeNodeBinding : IStateManager,
 ICloneable, IDataSourceViewSchemaAccessor
public ref class TreeNodeBinding sealed : IStateManager,
 ICloneable, IDataSourceViewSchemaAccessor
public final class TreeNodeBinding implements
 IStateManager, ICloneable, 
    IDataSourceViewSchemaAccessor
public final class TreeNodeBinding implements
 IStateManager, ICloneable, 
    IDataSourceViewSchemaAccessor
解説解説

複数属性を持つ XML 要素どのように、各データ項目に複数フィールド含まれているデータ ソースTreeView コントロールバインドされた場合ノードにはデータ項目の ToString メソッドから返される値が既定表示されます。XML 要素場合ノードには要素名が表示されます。これはメニュー ツリーの基になる構造体を示す以外はあまり用途はありません。ノードプロパティは、ツリー ノードバインディング指定して特定のフィールドバインドできますTreeNodeBinding オブジェクトは、各データ項目とそのバインド先のノードとの関係を定義します

TreeView コントロールは、その TreeNodeBinding オブジェクトを DataBindings プロパティ格納しデータ ソースバインディング適用してツリー階層構造データ ソース階層構造との間に一対一リレーションシップ作成しますデータ ソース内のデータ項目について、TreeView コントロールは、対応する TreeNode オブジェクト作成するために、データ項目と TreeNodeBinding オブジェクトとの照合試みます

TreeNodeBinding オブジェクト作成する場合バインディング基準指定する必要があります基準は、データ項目をノードバインドするタイミング示しますDepth プロパティと DataMember プロパティいずれか、または両方指定できます両方プロパティ指定すると、効率が少し向上しますノード深さバインドされるノード レベル指定します。たとえば、次の TreeNodeBinding 宣言は、データ ソースName フィールドID フィールドを、深さ 0 のすべてのノードText プロパティValue プロパティそれぞれバインドます。

<asp:TreeNodeBinding Depth="0" TextField="Name" ValueField="ID">

データ メンバは、基になるデータ ソースデータ項目の型を指定します。ただし、データ ソースによっては異な情報表している場合あります階層データ ソースの各データ項目 (System.Web.UI.IHierarchyData インターフェイス表される) は、データ項目の型を指定する IHierarchyData.Type プロパティ公開します。たとえば、XML 要素データ メンバは、要素名を指定しますデータ ソース複数データ項目の型がある場合使用するデータ項目の型をデータ メンバ指定します次の TreeNodeBinding 宣言は、階層構造の場所に無関係に、XmlDataSource コントロール<Book> 要素ツリー内のすべてのノードバインドます。

<asp:TreeNodeBinding DataMember="Book" TextField="Title" ValueField= "ISBN">

バインディング基準確立されたら、バインド可能な TreeNode オブジェクトプロパティを値にバインドできますデータ項目のフィールドまたは静的な値にバインドできますTreeNodeBinding オブジェクト静的な値がバインドされた場合、そのオブジェクト適用先となるすべての TreeNode オブジェクトは、同じ値を共有します

メモメモ

TreeNode オブジェクト内のバインドされたプロパティは、ノード内で対応するプロパティ直接設定することにより、選択してオーバーライドできます

TreeNode オブジェクトプロパティデータ項目のフィールドバインドできる、TreeNodeBinding クラスプロパティの一覧を次の表に示します

TreeNode オブジェクトプロパティ静的な値にバインドできる、TreeNodeBinding クラスプロパティの一覧を次の表に示します

プロパティ

説明

ImageUrl

TreeNode オブジェクトImageUrl プロパティバインドする静的な値。

ImageToolTip

TreeNode オブジェクトImageToolTip プロパティバインドする静的な値。

NavigateUrl

TreeNode オブジェクトの NavigateUrl プロパティバインドする静的な値。

PopulateOnDemand

TreeNode オブジェクトの PopulateOnDemand プロパティバインドする静的な値。

SelectAction

TreeNode オブジェクトの SelectAction プロパティバインドする静的な値。

ShowCheckBox

TreeNode オブジェクトの ShowCheckBox プロパティバインドする静的な値。

Target

TreeNode オブジェクトTarget プロパティバインドする静的な値。

Text

TreeNode オブジェクトText プロパティバインドする静的な値。

ToolTip

TreeNode オブジェクトToolTip プロパティバインドする静的な値。

Value

TreeNode オブジェクトValue プロパティバインドする静的な値。

競合する TreeNodeBinding オブジェクト定義されている場合TreeView コントロール次の優先順位ツリー ノードバインディング適用します。

  1. 深さデータ メンバ両方定義し照合する TreeNodeBinding オブジェクト

  2. データ メンバだけを定義し照合する TreeNodeBinding オブジェクト

  3. 深さだけを定義し照合する TreeNodeBinding オブジェクト

  4. 深さデータ メンバ定義しない TreeNodeBinding オブジェクト。この種のツリー ノード バインディングは、ツリー内のすべてのノード適用されます。

  5. データ ソース内に一致するものがない TreeNodeBinding オブジェクト。この場合データ項目の ToString メソッドによって返される値は、TreeNodeBinding オブジェクト適用されるノードText プロパティValue プロパティバインドされます

TreeNodeBinding クラスでは、FormatString プロパティ設定することにより、ノード表示されるテキスト書式設定することもできます

使用例使用例

ツリー ノード バインディング宣言の例を次の表に示します

バインディングの例

説明

<asp:TreeNodeBinding TextField="Title" ValueField= "ID"/>

ツリー内のすべてのノードText プロパティValue プロパティを、データ ソースTitle フィールドID フィールドそれぞれバインドます。DataMember プロパティDepth プロパティ設定されていないため、すべてのノードでこのツリー ノード バインディング宣言使用されます。

<asp:TreeNodeBinding DataMember= "Book" TextField= "Title" ValueField= "ID"/>

ツリー内のすべてのノードText プロパティValue プロパティを、データ ソースBook データ項目の Title フィールドID フィールドそれぞれバインドます。

<asp:TreeNodeBinding Depth="2" TextField= "Title" ValueField= "ID"/>

ツリー内の深さが 2 のすべてのノードText プロパティValue プロパティを、データ ソースデータ項目の Title フィールドID フィールドそれぞれバインドます。

<asp:TreeNodeBinding DataMember="Book" Depth= "2" TextField= "Title" ValueField= "ID" ImageUrl= "Image.jpg">

ツリー内の深さが 2 のすべてのノードText プロパティValue プロパティを、データ ソースBook データ項目の Title フィールドID フィールドそれぞれバインドます。また、ノードImageUrl プロパティ静的な値にバインドます。

このセクションには、3 つのコード例含まれています。TreeNodeBinding オブジェクト宣言によって使用しノードデータ項目との関係を定義する方法最初コード例示しますTreeNodeBinding オブジェクトプログラム使用しノードデータ項目との関係を定義する方法2 番目のコード例示します。1 番目と 2 番目のコード例対応したサンプル XML データ3 番目のコード例示します

TreeNodeBinding オブジェクト宣言によって使用しノードデータ項目との関係を定義する方法次のコード例示します。この例を正常に動作させるには、このコード例の後に示すサンプル XML データを、Book.xml という名前のファイルコピーする必要があります

<%@ Page Language="VB" %>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView XML Data Binding 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#" %>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView XML Data Binding 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>

TreeNodeBinding オブジェクトプログラム使用しノードデータ項目との関係を定義する方法次のコード例示します。この例を正常に動作させるには、次のコード例に示すサンプル XML データを、Book.xml という名前のファイルコピーする必要があります

<%@ Page Language="VB" %>

<script runat="server">

  Sub Page_Load(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Create a new TreeView control.
    Dim NewTree As New TreeView

    ' Set the properties of the TreeView control.
    NewTree.ID = "BookTreeView"
    NewTree.DataSourceID = "BookXmlDataSource"

    ' Create the tree node binding relationship.

    ' Create the root node binding.
    Dim RootBinding As New
 TreeNodeBinding
    RootBinding.DataMember = "Book"
    RootBinding.TextField = "Title"

    ' Create the parent node binding.
    Dim ParentBinding As New
 TreeNodeBinding
    ParentBinding.DataMember = "Chapter"
    ParentBinding.TextField = "Heading"

    ' Create the leaf node binding.
    Dim LeafBinding As New
 TreeNodeBinding
    LeafBinding.DataMember = "Section"
    LeafBinding.TextField = "Heading"

    ' Add bindings to the DataBindings collection.
    NewTree.DataBindings.Add(RootBinding)
    NewTree.DataBindings.Add(ParentBinding)
    NewTree.DataBindings.Add(LeafBinding)

    ' Manually register the event handler for the SelectedNodeChanged
 event.
    AddHandler NewTree.SelectedNodeChanged, AddressOf
 Node_Change

    ' Add the TreeView control to the Controls collection of the PlaceHolder
 control.
    ControlPlaceHolder.Controls.Add(NewTree)

  End Sub

  Sub Node_Change(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Retrieve the TreeView control from the Controls collection of
 the PlaceHolder control.
    Dim LocalTree As TreeView = CType(ControlPlaceHolder.FindControl("BookTreeView"),
 TreeView)

    ' Display the selected node.
    Message.Text = "You selected: " & LocalTree.SelectedNode.Text

  End Sub

</script>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Constructor Example</h3>
      
      <asp:PlaceHolder id="ControlPlaceHolder"
 runat="server">
      </asp:PlaceHolder>
   
      <asp:XmlDataSource id="BookXmlDataSource"
  
        DataFile="Book.xml"
        runat="server">
      </asp:XmlDataSource>
      
      <br><br>
      
      <asp:Label id="Message" runat="server"/>
    
    </form>
  </body>
</html>

<%@ Page Language="C#" %>

<script runat="server">

  void Page_Load(Object sender, EventArgs e)
  {

    // Create a new TreeView control.
    TreeView NewTree = new TreeView();

    // Set the properties of the TreeView control.
    NewTree.ID = "BookTreeView";
    NewTree.DataSourceID = "BookXmlDataSource";

    // Create the tree node binding relationship.

    // Create the root node binding.
    TreeNodeBinding RootBinding = new TreeNodeBinding();
    RootBinding.DataMember = "Book";
    RootBinding.TextField = "Title";

    // Create the parent node binding.
    TreeNodeBinding ParentBinding = new TreeNodeBinding();
    ParentBinding.DataMember = "Chapter";
    ParentBinding.TextField = "Heading";

    // Create the leaf node binding.
    TreeNodeBinding LeafBinding = new TreeNodeBinding();
    LeafBinding.DataMember = "Section";
    LeafBinding.TextField = "Heading";

    // Add bindings to the DataBindings collection.
    NewTree.DataBindings.Add(RootBinding);
    NewTree.DataBindings.Add(ParentBinding); 
    NewTree.DataBindings.Add(LeafBinding);

    // Manually register the event handler for the SelectedNodeChanged
 event.
    NewTree.SelectedNodeChanged += new EventHandler(this.Node_Change);

    // Add the TreeView control to the Controls collection of the PlaceHolder
 control.
    ControlPlaceHolder.Controls.Add(NewTree);

  }

  void Node_Change(Object sender, EventArgs e)
  {

    // Retrieve the TreeView control from the Controls collection of
 the PlaceHolder control.
    TreeView LocalTree = (TreeView)ControlPlaceHolder.FindControl("BookTreeView");

    // Display the selected node.
    Message.Text = "You selected: " + LocalTree.SelectedNode.Text;

  }

</script>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Constructor Example</h3>
      
      <asp:PlaceHolder id="ControlPlaceHolder" runat="server">
      </asp:PlaceHolder>
   
      <asp:XmlDataSource id="BookXmlDataSource"  
        DataFile="Book.xml"
        runat="server">
      </asp:XmlDataSource>
      
      <br><br>
      
      <asp:Label id="Message" runat="server"/>
    
    </form>
  </body>
</html>

前の 2 つコード例対応したサンプル XML データ次のコード例示します

<Book Title="Book Title">
    <Chapter Heading="Chapter 1">
        <Section Heading="Section 1">
        </Section>
        <Section Heading="Section 2">
        </Section>
    </Chapter>
    <Chapter Heading="Chapter 2">
        <Section Heading="Section 1">
        </Section>
    </Chapter>
</Book>
継承階層継承階層
System.Object
  System.Web.UI.WebControls.TreeNodeBinding
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TreeNodeBinding メンバ
System.Web.UI.WebControls 名前空間
TreeView
TreeNode クラス
TreeNodeBindingCollection
XmlDataSource
DataBindings
DataMember
Depth
FormatString
TreeNodeBinding.ImageUrl
ImageUrlField
ImageToolTip
ImageToolTipField
TreeNode.NavigateUrl プロパティ
TreeNodeBinding.NavigateUrl
NavigateUrlField
PopulateOnDemand
SelectAction
ShowCheckBox
Target
TreeNode.Text プロパティ
TreeNodeBinding.Text
TextField
TreeNode.ToolTip プロパティ
TreeNodeBinding.ToolTip
ToolTipField
TreeNode.Value プロパティ
TreeNodeBinding.Value
ValueField

TreeNodeBinding コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

TreeNodeBinding クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As New TreeNodeBinding
public TreeNodeBinding ()
public:
TreeNodeBinding ()
public TreeNodeBinding ()
public function TreeNodeBinding ()
解説解説
使用例使用例

TreeNodeBinding コンストラクタ使用してTreeNodeBinding オブジェクトTreeView コントロールDataBindings コレクション動的に追加する方法次のコード例示します

<%@ Page Language="VB" %>

<script runat="server">

  Sub Page_Load(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Create a new TreeView control.
    Dim NewTree As New TreeView

    ' Set the properties of the TreeView control.
    NewTree.ID = "BookTreeView"
    NewTree.DataSourceID = "BookXmlDataSource"

    ' Create the tree node binding relationship.

    ' Create the root node binding.
    Dim RootBinding As New
 TreeNodeBinding
    RootBinding.DataMember = "Book"
    RootBinding.TextField = "Title"

    ' Create the parent node binding.
    Dim ParentBinding As New
 TreeNodeBinding
    ParentBinding.DataMember = "Chapter"
    ParentBinding.TextField = "Heading"

    ' Create the leaf node binding.
    Dim LeafBinding As New
 TreeNodeBinding
    LeafBinding.DataMember = "Section"
    LeafBinding.TextField = "Heading"

    ' Add bindings to the DataBindings collection.
    NewTree.DataBindings.Add(RootBinding)
    NewTree.DataBindings.Add(ParentBinding)
    NewTree.DataBindings.Add(LeafBinding)

    ' Manually register the event handler for the SelectedNodeChanged
 event.
    AddHandler NewTree.SelectedNodeChanged, AddressOf
 Node_Change

    ' Add the TreeView control to the Controls collection of the PlaceHolder
 control.
    ControlPlaceHolder.Controls.Add(NewTree)

  End Sub

  Sub Node_Change(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Retrieve the TreeView control from the Controls collection of
 the PlaceHolder control.
    Dim LocalTree As TreeView = CType(ControlPlaceHolder.FindControl("BookTreeView"),
 TreeView)

    ' Display the selected node.
    Message.Text = "You selected: " & LocalTree.SelectedNode.Text

  End Sub

</script>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Constructor Example</h3>
      
      <asp:PlaceHolder id="ControlPlaceHolder"
 runat="server">
      </asp:PlaceHolder>
   
      <asp:XmlDataSource id="BookXmlDataSource"
  
        DataFile="Book.xml"
        runat="server">
      </asp:XmlDataSource>
      
      <br><br>
      
      <asp:Label id="Message" runat="server"/>
    
    </form>
  </body>
</html>

<%@ Page Language="C#" %>

<script runat="server">

  void Page_Load(Object sender, EventArgs e)
  {

    // Create a new TreeView control.
    TreeView NewTree = new TreeView();

    // Set the properties of the TreeView control.
    NewTree.ID = "BookTreeView";
    NewTree.DataSourceID = "BookXmlDataSource";

    // Create the tree node binding relationship.

    // Create the root node binding.
    TreeNodeBinding RootBinding = new TreeNodeBinding();
    RootBinding.DataMember = "Book";
    RootBinding.TextField = "Title";

    // Create the parent node binding.
    TreeNodeBinding ParentBinding = new TreeNodeBinding();
    ParentBinding.DataMember = "Chapter";
    ParentBinding.TextField = "Heading";

    // Create the leaf node binding.
    TreeNodeBinding LeafBinding = new TreeNodeBinding();
    LeafBinding.DataMember = "Section";
    LeafBinding.TextField = "Heading";

    // Add bindings to the DataBindings collection.
    NewTree.DataBindings.Add(RootBinding);
    NewTree.DataBindings.Add(ParentBinding); 
    NewTree.DataBindings.Add(LeafBinding);

    // Manually register the event handler for the SelectedNodeChanged
 event.
    NewTree.SelectedNodeChanged += new EventHandler(this.Node_Change);

    // Add the TreeView control to the Controls collection of the PlaceHolder
 control.
    ControlPlaceHolder.Controls.Add(NewTree);

  }

  void Node_Change(Object sender, EventArgs e)
  {

    // Retrieve the TreeView control from the Controls collection of
 the PlaceHolder control.
    TreeView LocalTree = (TreeView)ControlPlaceHolder.FindControl("BookTreeView");

    // Display the selected node.
    Message.Text = "You selected: " + LocalTree.SelectedNode.Text;

  }

</script>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Constructor Example</h3>
      
      <asp:PlaceHolder id="ControlPlaceHolder" runat="server">
      </asp:PlaceHolder>
   
      <asp:XmlDataSource id="BookXmlDataSource"  
        DataFile="Book.xml"
        runat="server">
      </asp:XmlDataSource>
      
      <br><br>
      
      <asp:Label id="Message" runat="server"/>
    
    </form>
  </body>
</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TreeNodeBinding クラス
TreeNodeBinding メンバ
System.Web.UI.WebControls 名前空間
TreeView
TreeNode クラス
TreeNodeBindingCollection

TreeNodeBinding プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ DataMember ツリー ノード バインディング適用するかどうか判断するために、データ項目の IHierarchyData.Type プロパティ照合する値を取得または設定します
パブリック プロパティ Depth TreeNodeBinding オブジェクト適用されるノード深さ取得または設定します
パブリック プロパティ FormatString TreeNodeBinding オブジェクト適用されるノードテキスト表示形式指定する文字列取得または設定します
パブリック プロパティ ImageToolTip TreeNodeBinding オブジェクト適用されるノードの横に表示されるイメージツールヒント テキスト取得または設定します
パブリック プロパティ ImageToolTipField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの ImageToolTip プロパティバインドます。
パブリック プロパティ ImageUrl TreeNodeBinding オブジェクト適用されるノードの横に表示されるイメージURL取得または設定します
パブリック プロパティ ImageUrlField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの ImageUrl プロパティバインドます。
パブリック プロパティ NavigateUrl TreeNodeBinding オブジェクト適用されるノードクリックしたときにリンクする URL取得または設定します
パブリック プロパティ NavigateUrlField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの NavigateUrl プロパティバインドます。
パブリック プロパティ PopulateOnDemand TreeNodeBinding オブジェクト適用されるノード動的にデータ設定するかどうかを示す値を取得または設定します
パブリック プロパティ SelectAction TreeNodeBinding オブジェクト適用されるノード選択したときに発生するイベント取得または設定します
パブリック プロパティ ShowCheckBox TreeNodeBinding オブジェクト適用されるノードの横にチェック ボックス表示するかどうかを示す値を取得または設定します
パブリック プロパティ Target TreeNodeBinding オブジェクト適用されるノード関連付けられている Web ページコンテンツ表示する対象ウィンドウまたはフレーム取得または設定します
パブリック プロパティ TargetField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトTarget プロパティバインドます。
パブリック プロパティ Text TreeNodeBinding オブジェクト適用されるノード表示されるテキスト取得または設定します
パブリック プロパティ TextField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトText プロパティバインドます。
パブリック プロパティ ToolTip TreeNodeBinding オブジェクト適用されるノードツールヒント テキスト取得または設定します
パブリック プロパティ ToolTipField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトToolTip プロパティバインドます。
パブリック プロパティ Value TreeNodeBinding オブジェクト適用されるノード補足データ (ポストバック イベントの処理に使用するデータなど) を格納するために使用される、非表示の値を取得または設定します
パブリック プロパティ ValueField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトValue プロパティバインドます。
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Web.UI.IDataSourceViewSchemaAccessor.DataSourceViewSchema このメンバ説明については、IDataSourceViewSchemaAccessor.DataSourceViewSchema のトピック参照してください
インターフェイスの明示的な実装 System.Web.UI.IStateManager.IsTrackingViewState このメンバ説明については、IStateManager.IsTrackingViewState のトピック参照してください
参照参照

関連項目

TreeNodeBinding クラス
System.Web.UI.WebControls 名前空間
TreeView
TreeNode クラス
TreeNodeBindingCollection
XmlDataSource
DataBindings
DataMember
Depth
FormatString
TreeNodeBinding.ImageUrl
ImageUrlField
ImageToolTip
ImageToolTipField
TreeNode.NavigateUrl プロパティ
TreeNodeBinding.NavigateUrl
NavigateUrlField
PopulateOnDemand
SelectAction
ShowCheckBox
Target
TreeNode.Text プロパティ
TreeNodeBinding.Text
TextField
TreeNode.ToolTip プロパティ
TreeNodeBinding.ToolTip
ToolTipField
TreeNode.Value プロパティ
TreeNodeBinding.Value
ValueField

TreeNodeBinding メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone TreeNodeBinding オブジェクトコピー作成します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.LoadViewState 以前保存したノードビューステート読み込みます。
インターフェイスの明示的な実装 System.Web.UI.IStateManager.SaveViewState ビューステート変更オブジェクト保存します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.TrackViewState ビューステートへの変更追跡するように TreeNode オブジェクト指示します
参照参照

関連項目

TreeNodeBinding クラス
System.Web.UI.WebControls 名前空間
TreeView
TreeNode クラス
TreeNodeBindingCollection
XmlDataSource
DataBindings
DataMember
Depth
FormatString
TreeNodeBinding.ImageUrl
ImageUrlField
ImageToolTip
ImageToolTipField
TreeNode.NavigateUrl プロパティ
TreeNodeBinding.NavigateUrl
NavigateUrlField
PopulateOnDemand
SelectAction
ShowCheckBox
Target
TreeNode.Text プロパティ
TreeNodeBinding.Text
TextField
TreeNode.ToolTip プロパティ
TreeNodeBinding.ToolTip
ToolTipField
TreeNode.Value プロパティ
TreeNodeBinding.Value
ValueField

TreeNodeBinding メンバ

データ項目と、それが TreeView コントロール内でバインドしているノードとの関係を定義します

TreeNodeBinding データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド TreeNodeBinding TreeNodeBinding クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ DataMember ツリー ノード バインディング適用するかどうか判断するために、データ項目の IHierarchyData.Type プロパティ照合する値を取得または設定します
パブリック プロパティ Depth TreeNodeBinding オブジェクト適用されるノード深さ取得または設定します
パブリック プロパティ FormatString TreeNodeBinding オブジェクト適用されるノードテキスト表示形式指定する文字列取得または設定します
パブリック プロパティ ImageToolTip TreeNodeBinding オブジェクト適用されるノードの横に表示されるイメージツールヒント テキスト取得または設定します
パブリック プロパティ ImageToolTipField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの ImageToolTip プロパティバインドます。
パブリック プロパティ ImageUrl TreeNodeBinding オブジェクト適用されるノードの横に表示されるイメージURL取得または設定します
パブリック プロパティ ImageUrlField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの ImageUrl プロパティバインドます。
パブリック プロパティ NavigateUrl TreeNodeBinding オブジェクト適用されるノードクリックしたときにリンクする URL取得または設定します
パブリック プロパティ NavigateUrlField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトの NavigateUrl プロパティバインドます。
パブリック プロパティ PopulateOnDemand TreeNodeBinding オブジェクト適用されるノード動的にデータ設定するかどうかを示す値を取得または設定します
パブリック プロパティ SelectAction TreeNodeBinding オブジェクト適用されるノード選択したときに発生するイベント取得または設定します
パブリック プロパティ ShowCheckBox TreeNodeBinding オブジェクト適用されるノードの横にチェック ボックス表示するかどうかを示す値を取得または設定します
パブリック プロパティ Target TreeNodeBinding オブジェクト適用されるノード関連付けられている Web ページコンテンツ表示する対象ウィンドウまたはフレーム取得または設定します
パブリック プロパティ TargetField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトTarget プロパティバインドます。
パブリック プロパティ Text TreeNodeBinding オブジェクト適用されるノード表示されるテキスト取得または設定します
パブリック プロパティ TextField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトText プロパティバインドます。
パブリック プロパティ ToolTip TreeNodeBinding オブジェクト適用されるノードツールヒント テキスト取得または設定します
パブリック プロパティ ToolTipField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトToolTip プロパティバインドます。
パブリック プロパティ Value TreeNodeBinding オブジェクト適用されるノード補足データ (ポストバック イベントの処理に使用するデータなど) を格納するために使用される、非表示の値を取得または設定します
パブリック プロパティ ValueField データ ソースからフィールドの名前を取得または設定しTreeNodeBinding オブジェクト適用される TreeNode オブジェクトValue プロパティバインドます。
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone TreeNodeBinding オブジェクトコピー作成します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.LoadViewState 以前保存したノードビューステート読み込みます。
インターフェイスの明示的な実装 System.Web.UI.IStateManager.SaveViewState ビューステート変更オブジェクト保存します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.TrackViewState ビューステートへの変更追跡するように TreeNode オブジェクト指示します
インターフェイスの明示的な実装 System.Web.UI.IDataSourceViewSchemaAccessor.DataSourceViewSchema このメンバ説明については、IDataSourceViewSchemaAccessor.DataSourceViewSchema のトピック参照してください
インターフェイスの明示的な実装 System.Web.UI.IStateManager.IsTrackingViewState このメンバ説明については、IStateManager.IsTrackingViewState のトピック参照してください
参照参照

関連項目

TreeNodeBinding クラス
System.Web.UI.WebControls 名前空間
TreeView
TreeNode クラス
TreeNodeBindingCollection
XmlDataSource
DataBindings
DataMember
Depth
FormatString
TreeNodeBinding.ImageUrl
ImageUrlField
ImageToolTip
ImageToolTipField
TreeNode.NavigateUrl プロパティ
TreeNodeBinding.NavigateUrl
NavigateUrlField
PopulateOnDemand
SelectAction
ShowCheckBox
Target
TreeNode.Text プロパティ
TreeNodeBinding.Text
TextField
TreeNode.ToolTip プロパティ
TreeNodeBinding.ToolTip
ToolTipField
TreeNode.Value プロパティ
TreeNodeBinding.Value
ValueField


このページでは「.NET Framework クラス ライブラリ リファレンス」からTreeNodeBindingを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTreeNodeBindingを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTreeNodeBinding を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TreeNodeBinding」の関連用語

TreeNodeBindingのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TreeNodeBindingのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS