Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

WebArticlesForumsFAQs
JavaScript
ASP
ASP.NET
WCF

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

Operating SysArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Lounge
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

  View Other Visual Studio .NET Posts   Ask New Question  Ask New Question With Power Editor

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
Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0
Client-Side handling of treeview and listbox ctrl
Surendra Sambana replied on 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
Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0