Assembly: System.Web (in System.Web.dll)
Appends the specified TreeNodeBinding object to the end of the object.
Determines whether the specified TreeNodeBinding object is in the collection.
Copies all the items from the TreeNodeBinding objects, starting at the specified index in the target array.object to a compatible one-dimensional array of
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Determines the index of the specified TreeNodeBinding object in the collection.
Inserts the specified TreeNodeBinding object into the object at the specified index location.
Removes the specified TreeNodeBinding object from the object.
Removes the TreeNodeBinding object at the specified index location from the object.
Returns a string that represents the current object.(Inherited from Object.)
Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)
The DataBindings property contains TreeNodeBinding objects that define the relationship between a data item and the node that it is binding to. When binding to a data source where each data item contains multiple properties (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. 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. You can bind a node to a specific data item property by specifying tree node bindings. Although the DataBindings collection can be programmatically populated, it is usually set declaratively.
To set the tree node bindings declaratively:
Nest opening and closing <DataBindings> tags between the opening and closing tags of the TreeView control.
Place <asp:TreeNodeBinding> elements between the opening and closing <DataBindings> tags for each tree node binding that you want to specify.
You can programmatically manage a TreeNodeBinding objects. To add a TreeNodeBinding object to the collection, use the Add or Insert method. To remove nodes from the collection, use the Remove, RemoveAt, or StateManagedCollection.Clear method.by adding and removing
Theclass supports several ways to access the items in the collection:
This section contains two code examples. The first code example demonstrates how to populate aobject declaratively. The second code example demonstrates how to populate a object programmatically.
The following code example demonstrates how to populate aobject declaratively. For this example to work correctly, you must copy the XML data that is located at the end of this section to a file called Book.xml.
The following code example demonstrates how to populate aobject programmatically. For this example to work correctly, you must copy the sample XML data that is located at the end of this section to a file called Book.xml.
The following is the 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>
Available since 2.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.