TreeNodeBinding Classe

Definição

Define a relação entre um item de dados e o nó que ele está associando a um controle TreeView.Defines the relationship between a data item and the node it is binding to in a TreeView control.

public ref class TreeNodeBinding sealed : ICloneable, System::Web::UI::IDataSourceViewSchemaAccessor, System::Web::UI::IStateManager
public sealed class TreeNodeBinding : ICloneable, System.Web.UI.IDataSourceViewSchemaAccessor, System.Web.UI.IStateManager
type TreeNodeBinding = class
    interface IStateManager
    interface ICloneable
    interface IDataSourceViewSchemaAccessor
Public NotInheritable Class TreeNodeBinding
Implements ICloneable, IDataSourceViewSchemaAccessor, IStateManager
Herança
TreeNodeBinding
Implementações

Exemplos

A tabela a seguir mostra alguns exemplos de declarações de associação de nó de árvore.The following table shows some example tree node binding declarations.

Exemplo de associaçãoExample binding DescriçãoDescription
<asp:TreeNodeBinding TextField="Title" ValueField= "ID"/> Associa as Text Propriedades e Value de todos os nós na árvore aos Title ID campos e da fonte de dados, respectivamente.Binds the Text and Value properties of all nodes in the tree to the Title and ID fields of the data source, respectively. Todos os nós usam esta declaração de associação de nó de árvore porque as DataMember Depth Propriedades e não estão definidas.All nodes use this tree node binding declaration because the DataMember and Depth properties are not set.
<asp:TreeNodeBinding DataMember= "Book" TextField= "Title" ValueField= "ID"/> Associa as Text Propriedades e Value de todos os nós na árvore aos Title ID campos e do item de Book dados na fonte de dados, respectivamente.Binds the Text and Value properties of all nodes in the tree to the Title and ID fields of the Book data item in the data source, respectively.
<asp:TreeNodeBinding Depth="2" TextField= "Title" ValueField= "ID"/> Associa as Text Propriedades e Value de todos os nós com uma profundidade de 2 na árvore aos Title ID campos e do item de dados na fonte de dados, respectivamente.Binds the Text and Value properties of all nodes with a depth of 2 in the tree to the Title and ID fields of the data item in the data source, respectively.
<asp:TreeNodeBinding DataMember="Book" Depth= "2" TextField= "Title" ValueField= "ID" ImageUrl= "Image.jpg"> Associa as Text Propriedades e Value de todos os nós com uma profundidade de 2 na árvore aos Title ID campos e do item de Book dados na fonte de dados, respectivamente.Binds the Text and Value properties of all nodes with a depth of 2 in the tree to the Title and ID fields of the Book data item in the data source, respectively. Também associa a ImageUrl propriedade dos nós a um valor estático.Also binds the ImageUrl property of the nodes to a static value.

Esta seção contém três exemplos de código.This section contains three code examples. O primeiro exemplo de código demonstra como usar TreeNodeBinding objetos de forma declarativa para definir a relação entre um nó e um item de dados.The first code example demonstrates how to use TreeNodeBinding objects declaratively to define the relationship between a node and a data item. O segundo exemplo de código demonstra como usar TreeNodeBinding objetos programaticamente para definir a relação entre um nó e um item de dados.The second code example demonstrates how to use TreeNodeBinding objects programmatically to define the relationship between a node and a data item. O terceiro exemplo de código fornece dados XML de exemplo para o primeiro e segundo exemplos de código.The third code example provides sample XML data for the first and second code examples.

O exemplo de código a seguir demonstra como usar objetos de forma TreeNodeBinding declarativa para definir a relação entre um nó e um item de dados.The following code example demonstrates how to use TreeNodeBinding objects declaratively to define the relationship between a node and a data item. Para que este exemplo funcione corretamente, você deve copiar os dados XML de exemplo, fornecidos após este exemplo de código, para um arquivo chamado Book.xml.For this example to work correctly, you must copy the sample XML data, provided after this code example, to a file named Book.xml.


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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeView XML Data Binding Example</title>
</head>
<body>
    <form id="form1" 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="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeView XML Data Binding Example</title>
</head>
<body>
    <form id="form1" 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>

O exemplo de código a seguir demonstra como usar TreeNodeBinding objetos programaticamente para definir a relação entre um nó e um item de dados.The following code example demonstrates how to use TreeNodeBinding objects programmatically to define the relationship between a node and a data item. Para que este exemplo funcione corretamente, você deve copiar os dados XML de exemplo fornecidos no próximo exemplo de código para um arquivo chamado Book.xml.For this example to work correctly, you must copy the sample XML data that is provided in the next code example to a file named Book.xml.


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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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 xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeView Constructor Example</title>
</head>
<body>
    <form id="form1" 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="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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 xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeView Constructor Example</title>
</head>
<body>
    <form id="form1" 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>

O exemplo de código a seguir fornece dados XML de exemplo para os exemplos de código anteriores.The following code example provides sample XML data for the preceding code examples.

<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>  

Comentários

Quando o TreeView controle está associado a uma fonte de dados em que cada item de dados contém vários campos (como um elemento XML com vários atributos), um nó exibe o valor retornado pelo ToString método do item de dados, por padrão.When the TreeView control is bound to a data source where each data item contains multiple fields (such as an XML element with several attributes), a node displays the value that is returned by the ToString method of the data item, by default. No caso de um elemento XML, o nó exibe o nome do elemento, que mostra a estrutura subjacente da árvore, mas não é muito útil do contrário.In the case of an XML element, the node displays the element name, which shows the underlying structure of the tree, but is not very useful otherwise. Você pode associar as propriedades de um nó a um campo específico especificando associações de nó de árvore.You can bind the properties of a node to a specific field by specifying tree node bindings. Um TreeNodeBinding objeto define a relação entre cada item de dados e o nó ao qual ele está se associando.A TreeNodeBinding object defines the relationship between each data item and the node that it is binding to.

O TreeView controle armazena seus TreeNodeBinding objetos na DataBindings propriedade e aplica as associações à fonte de dados para criar uma relação um-para-um entre a hierarquia de árvore e a hierarquia de fonte de dados.The TreeView control stores its TreeNodeBinding objects in the DataBindings property and applies the bindings to the data source to create a one-to-one relationship between the tree hierarchy and the data source hierarchy. Para cada item de dados na fonte de dados, o TreeView controle tenta corresponder o item de dados a um TreeNodeBinding objeto a fim de criar o TreeNode objeto correspondente.For each data item in the data source, the TreeView control attempts to match the data item to a TreeNodeBinding object in order to create the corresponding TreeNode object.

Ao criar um TreeNodeBinding objeto, você deve especificar os critérios de associação.When creating a TreeNodeBinding object, you must specify the criteria for binding. Os critérios indicam quando um item de dados deve ser associado a um nó.The criteria indicates when a data item should be bound to a node. Você pode especificar a Depth propriedade ou ou DataMember ambas as propriedades.You can specify the Depth or DataMember property, or both properties. Há um pequeno lucro de desempenho, especificando ambos.There is a slight performance gain by specifying both. Uma profundidade de nó especifica o nível de nó que é associado.A node depth specifies the node level that gets bound. Por exemplo, a declaração a seguir TreeNodeBinding associa os Name ID campos e da fonte de dados às Text Propriedades e Value , respectivamente, de todos os nós com uma profundidade de 0:For example, the following TreeNodeBinding declaration binds the Name and ID fields of the data source to the Text and Value properties, respectively, of all nodes with a depth of 0:

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

Um membro de dados especifica o tipo do item de dados na fonte de dados subjacente, mas pode representar informações diferentes dependendo da fonte de dados.A data member specifies the type of the data item in the underlying data source, but can represent different information depending on the data source. Cada item de dados em uma fonte de dados hierárquica (representado por uma System.Web.UI.IHierarchyData interface) expõe uma IHierarchyData.Type propriedade, que especifica o tipo do item de dados.Each data item in a hierarchical data source (represented by a System.Web.UI.IHierarchyData interface) exposes a IHierarchyData.Type property, which specifies the type of the data item. Por exemplo, o membro de dados para um elemento XML especifica o nome do elemento.For example, the data member for an XML element specifies the name of the element. Quando uma fonte de dados contém vários tipos de item de dados, o membro de dados especifica qual tipo de item de dados usar.When a data source contains multiple data item types, the data member specifies which data item type to use. A declaração a seguir TreeNodeBinding associa os <Book> elementos de um XmlDataSource controle a todos os nós na árvore, independentemente do local na hierarquia:The following TreeNodeBinding declaration binds the <Book> elements of an XmlDataSource control to all the nodes in the tree, regardless of the location in the hierarchy:

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

Depois que os critérios de associação são estabelecidos, você pode associar uma propriedade de um TreeNode objeto que pode ser associado a um valor.Once the binding criteria is established, you can then bind a property of a TreeNode object that can be bound to a value. Você pode associar a um campo de um item de dados ou a um valor estático.You can bind to a field of a data item or to a static value. Quando associado a um valor estático, todos os TreeNode objetos aos quais o TreeNodeBinding objeto é aplicado compartilham o mesmo valor.When bound to a static value, all TreeNode objects to which the TreeNodeBinding object is applied share the same value.

Observação

Você pode substituir seletivamente uma propriedade associada em um TreeNode objeto definindo a propriedade correspondente diretamente no nó.You can selectively override a bound property in a TreeNode object by setting the corresponding property directly in the node.

A tabela a seguir lista as propriedades da TreeNodeBinding classe que permitem associar uma propriedade do TreeNode objeto a um campo de um item de dados.The following table lists the properties of the TreeNodeBinding class that allow you to bind a property of the TreeNode object to a field of a data item.

PropriedadeProperty DescriçãoDescription
ImageUrlField O campo a ser associado à ImageUrl propriedade de um TreeNode objeto.The field to bind to the ImageUrl property of a TreeNode object.
ImageToolTipField O campo a ser associado à ImageToolTip propriedade de um TreeNode objeto.The field to bind to the ImageToolTip property of a TreeNode object.
NavigateUrlField O campo a ser associado à NavigateUrl propriedade de um TreeNode objeto.The field to bind to the NavigateUrl property of a TreeNode object.
TextField O campo a ser associado à Text propriedade de um TreeNode objeto.The field to bind to the Text property of a TreeNode object.
ToolTipField O campo a ser associado à ToolTip propriedade de um TreeNode objeto.The field to bind to the ToolTip property of a TreeNode object.
ValueField O campo a ser associado à Value propriedade de um TreeNode objeto.The field to bind to the Value property of a TreeNode object.

A tabela a seguir lista as propriedades da TreeNodeBinding classe que permitem associar uma propriedade do TreeNode objeto a um valor estático.The following table lists the properties of the TreeNodeBinding class that allow you to bind a property of the TreeNode object to a static value.

PropriedadeProperty DescriçãoDescription
ImageUrl O valor estático a ser associado à ImageUrl propriedade de um TreeNode objeto.The static value to bind to the ImageUrl property of a TreeNode object.
ImageToolTip O valor estático a ser associado à ImageToolTip propriedade de um TreeNode objeto.The static value to bind to the ImageToolTip property of a TreeNode object.
NavigateUrl O valor estático a ser associado à NavigateUrl propriedade de um TreeNode objeto.The static value to bind to the NavigateUrl property of a TreeNode object.
PopulateOnDemand O valor estático a ser associado à PopulateOnDemand propriedade de um TreeNode objeto.The static value to bind to the PopulateOnDemand property of a TreeNode object.
SelectAction O valor estático a ser associado à SelectAction propriedade de um TreeNode objeto.The static value to bind to the SelectAction property of a TreeNode object.
ShowCheckBox O valor estático a ser associado à ShowCheckBox propriedade de um TreeNode objeto.The static value to bind to the ShowCheckBox property of a TreeNode object.
Target O valor estático a ser associado à Target propriedade de um TreeNode objeto.The static value to bind to the Target property of a TreeNode object.
Text O valor estático a ser associado à Text propriedade de um TreeNode objeto.The static value to bind to the Text property of a TreeNode object.
ToolTip O valor estático a ser associado à ToolTip propriedade de um TreeNode objeto.The static value to bind to the ToolTip property of a TreeNode object.
Value O valor estático a ser associado à Value propriedade de um TreeNode objeto.The static value to bind to the Value property of a TreeNode object.

Se objetos conflitantes TreeNodeBinding forem definidos, o TreeView controle aplicará as associações de nó de árvore na seguinte ordem de precedência:If conflicting TreeNodeBinding objects are defined, the TreeView control applies the tree node bindings in the following order of precedence:

  1. O TreeNodeBinding objeto que define e corresponde a uma profundidade e a um membro de dados.The TreeNodeBinding object that defines and matches both a depth and a data member.

  2. O TreeNodeBinding objeto que define e corresponde somente ao membro de dados.The TreeNodeBinding object that defines and matches the data member only.

  3. O TreeNodeBinding objeto que define e corresponde apenas à profundidade.The TreeNodeBinding object that defines and matches the depth only.

  4. O TreeNodeBinding objeto que define nem a profundidade nem o membro de dados.The TreeNodeBinding object that defines neither the depth nor the data member. (Esse tipo de associação de nó de árvore é aplicado a todos os nós na árvore.)(This type of tree node binding is applied to all nodes in the tree.)

  5. O TreeNodeBinding objeto que não tem uma correspondência na fonte de dados.The TreeNodeBinding object that does not have a match in the data source. Nesse caso, o valor retornado pelo ToString método do item de dados é vinculado às Text Value Propriedades e dos nós aos quais o TreeNodeBinding objeto é aplicado.In this case, the value that is returned by the ToString method of the data item is then bound to the Text and Value properties of the nodes to which the TreeNodeBinding object is applied.

A TreeNodeBinding classe também permite formatar o texto exibido em um nó definindo a FormatString propriedade.The TreeNodeBinding class also allows you to format the text that is displayed in a node by setting the FormatString property.

Construtores

TreeNodeBinding()

Inicializa uma nova instância da classe TreeNodeBinding.Initializes a new instance of the TreeNodeBinding class.

Propriedades

DataMember

Obtém ou define o valor a corresponder com uma propriedade Type para um item de dados para determinar se é necessário aplicar a associação do nó de árvore.Gets or sets the value to match against a Type property for a data item to determine whether to apply the tree node binding.

Depth

Obtém ou define a profundidade do nó à qual o objeto TreeNodeBinding é aplicado.Gets or sets the node depth at which the TreeNodeBinding object is applied.

FormatString

Obtém ou define a cadeia de caracteres que especifica o formato de exibição do texto de um nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the string that specifies the display format for the text of a node to which the TreeNodeBinding object is applied.

ImageToolTip

Obtém ou define o texto de dica de ferramenta para a imagem que é exibida ao lado de um nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the ToolTip text for the image that is displayed next to a node to which the TreeNodeBinding object is applied.

ImageToolTipField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade ImageToolTip de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the ImageToolTip property of a TreeNode object to which the TreeNodeBinding object is applied.

ImageUrl

Obtém ou define a URL para uma imagem que é exibida ao lado de um nó ao qual o TreeNodeBinding objeto é aplicado.Gets or sets the URL to an image that is displayed next to a node to which the TreeNodeBinding object is applied.

ImageUrlField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade ImageUrl de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the ImageUrl property of a TreeNode object to which the TreeNodeBinding object is applied.

NavigateUrl

Obtém ou define a URL à qual vincular quando um nó ao qual o objeto TreeNodeBinding está aplicado é clicado.Gets or sets the URL to link to when a node to which the TreeNodeBinding object is applied is clicked.

NavigateUrlField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade NavigateUrl de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the NavigateUrl property of a TreeNode object to which the TreeNodeBinding object is applied.

PopulateOnDemand

Obtém ou define um valor que indica se o nó ao qual o objeto TreeNodeBinding é aplicado é preenchido dinamicamente.Gets or sets a value indicating whether the node to which the TreeNodeBinding object is applied is populated dynamically.

SelectAction

Obtém ou define o evento ou os eventos a gerar quando é selecionado um nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the event or events to raise when a node to which the TreeNodeBinding object is applied is selected.

ShowCheckBox

Obtém ou define um valor que indica se uma caixa de seleção é exibida ao lado de um nó no qual o objeto TreeNodeBinding é aplicado.Gets or sets a value indicating whether a check box is displayed next to a node to which the TreeNodeBinding object is applied.

Target

Obtém ou define a janela ou o quadro de destino no qual exibir o conteúdo da página da Web associada a um nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the target window or frame in which to display the Web page content that is associated with a node to which the TreeNodeBinding object is applied.

TargetField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade Target de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the Target property of a TreeNode object to which the TreeNodeBinding object is applied.

Text

Obtém ou define o texto que é exibido para o nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the text that is displayed for the node to which the TreeNodeBinding object is applied.

TextField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade Text de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the Text property of a TreeNode object to which the TreeNodeBinding object is applied.

ToolTip

Obtém ou define o texto de dica de ferramenta para um nó ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the ToolTip text for a node to which the TreeNodeBinding object is applied.

ToolTipField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade ToolTip de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the ToolTip property of a TreeNode object to which the TreeNodeBinding object is applied.

Value

Obtém ou define um valor exibido que não é exibido, mas é usado para armazenar quaisquer dados adicionais sobre um nó ao qual o objeto TreeNodeBinding é aplicado, como os dados usados para tratar eventos de postback.Gets or sets a displayed value that is not displayed but is used to store any additional data about a node to which the TreeNodeBinding object is applied, such as data used for handling postback events.

ValueField

Obtém ou define o nome do campo da fonte de dados a ser associado à propriedade Value de um objeto TreeNode ao qual o objeto TreeNodeBinding é aplicado.Gets or sets the name of the field from the data source to bind to the Value property of a TreeNode object to which the TreeNodeBinding object is applied.

Métodos

Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Herdado de Object)
GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Herdado de Object)
GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
ToString()

Retorna a propriedade DataMember.Returns the DataMember property.

Implantações explícitas de interface

ICloneable.Clone()

Cria uma cópia do objeto TreeNodeBinding.Creates a copy of the TreeNodeBinding object.

IDataSourceViewSchemaAccessor.DataSourceViewSchema

Para obter uma descrição desse membro, confira DataSourceViewSchema.For a description of this member, see DataSourceViewSchema.

IStateManager.IsTrackingViewState

Para obter uma descrição desse membro, confira IsTrackingViewState.For a description of this member, see IsTrackingViewState.

IStateManager.LoadViewState(Object)

Carrega o estado de exibição salvo anteriormente para o nó.Loads the previously saved view state for the node.

IStateManager.SaveViewState()

Salva as alterações ao estado de exibição a um objeto.Saves the view state changes to an object.

IStateManager.TrackViewState()

Instrui o objeto TreeNode a acompanhar as alterações em seu estado de exibição.Instructs the TreeNode object to track changes to its view state.

Aplica-se a

Confira também