| |||||||||||
TreeView.PopulateNodesFromClient PropertySystem.Web.UI.WebControls Namespace TreeView Class .NET Framework version 2.0 Sets or retrieves a value indicating whether node data for a TreeView control is populated on demand from the client. Syntax
Property ValueThis property accepts or returns only a boolean value: true to populate tree node data on demand from the client; otherwise, false. Default value is true. RemarksUse the PopulateNodesFromClient property to specify whether node data for a TreeView control is populated on demand from the client. There are cases where it is not practical to statically predefine the tree structure due to data size or custom content that depends on user input. For these cases, the TreeView control supports dynamic node population. When the PopulateOnDemand property for a node is set to true, that node gets populated at run time when the node is expanded. In addition to populating nodes on demand, it is possible to populate the nodes directly on a supported client browser. When the PopulateNodesFromClient property is set to true, a service is called from the client to populate the tree nodes, which eliminates the need to post back to the server. Otherwise, the TreeView control posts back to the server to populate the nodes.
To populate a node on the client, first set the PopulateNodesFromClient property to true and then set the PopulateOnDemand property for the node to true. Next, define an event-handling method for the TreeNodePopulate event that programmatically populates the node. The method assigned to handle the event should be able to do the following:
ExampleThe following examples demonstrate how to use the PopulateNodesFromClient property to render client-side script that is used to expand and collapse nodes on compatible browsers.
See Also |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme