| Client-Side handling of treeview and listbox ctrl |
| orb1234 developer posted at Friday, July 30, 2004 2:38 AM |
Hi,
I have a page where I use the IE Treeview control (populated from a XML) and the ListBox control. I need to use Client-Side handling to move the selectedItem text value from the treeview to the ListBox. I have an Image server control that has an "onclick" event that activates a JS function.
All controls are created dynamically by the code-behind file.
The situation is that I am able to access both the treeview and listbox controls in the JS function on the Client-Side, but I'm unable to find the syntax for getting the selected item from the treeview and adding a new item to the listbox (having the properties of the treeview item) in JavaScript.
Any information will be most appreciated
Thanks |
 |
|
|
| |
| Client-Side handling of treeview and listbox ctrl |
| Surendra Sambana replied at Tuesday, August 10, 2004 2:39 AM |
You need to call the function by onselectedindexchange attribure.
U can get the node by (Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs e) event
node_name =Treeview1.GetNodeFromIndex(e.NewNode).Text.ToString() ;
hope it will be useful fo r u.
Have a nice day
Surendra |
 |
| |