473,789 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

treeview expand client-side attribute

i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes. Add("onexpand", "javascript:ale rt(this);");
i cannot make this work
i would like to know if this is the way I should do it, or should i
add some event somehow to each node
basically i would like to do some javascript action on each expand -
each (expanded) node
(later on collapse too)
i found this example in articles like this one:
http://p2p.wrox.com/topic.asp?TOPIC_ID=46824
basically i have somthing like this:
nodeSection.Nav igateUrl = "javascript:sho wMenu('Section' , " +
rowSection["ContractSectio nId"].ToString() + ", " +
rowSection.GetC hildRows("Secti onToGroup").Len gth.ToString() + ");";
i would like to add an other feature like this, only this time i'd
like to do it on expand / collapse ...
thanks

Apr 20 '07 #1
1 2683
I just been trying to fix one of my own issues (styling the treeview). I
found this site, then looking on the list of articles, found this link.

http://www.java2s.com/Code/ASP/Compo...ctionVBnet.htm

Perhaps just what you want. It seems there is an onexpand attribute that you
can already use.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"Swoosh" <Sw****@discuss ions.microsoft. comwrote in message
news:96******** *************** ***********@mic rosoft.com...
>i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes. Add("onexpand", "javascript:ale rt(this);");
i cannot make this work
i would like to know if this is the way I should do it, or should i
add some event somehow to each node
basically i would like to do some javascript action on each expand -
each (expanded) node
(later on collapse too)
i found this example in articles like this one:
http://p2p.wrox.com/topic.asp?TOPIC_ID=46824
basically i have somthing like this:
nodeSection.Nav igateUrl = "javascript:sho wMenu('Section' , " +
rowSection["ContractSectio nId"].ToString() + ", " +
rowSection.GetC hildRows("Secti onToGroup").Len gth.ToString() + ");";
i would like to add an other feature like this, only this time i'd
like to do it on expand / collapse ...
thanks

Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1431
by: Rod Billett | last post by:
I programmatically place a treeview inside a DIV tag to enable scrolling. I am also dynamically populating the nodes in the ExpandNode event. Before placing the treeview within the Div, everything worked properly. After wrapping it within the div tag, I get the following behavior: * If I click in any of the nodes that are visible without scrolling, they expand properly * If I use the arrow keys to scroll up or down to 'newly visible'...
2
2438
by: Stephen | last post by:
In asp.net 1.1, the IE treeview web control has a property called "SelectExpands" that, when set to true, expands a node when a user clicks the node text. I can't seem to replicate this in the treeview control in .net 2.0. Anyone know of way to expand a node when a users clicks the node text?
4
10142
by: Karim El Jed | last post by:
Hi, I'm trying to expand a special Node of my TreeView from Codebehind. I have a TreeView on a page for navigating to another site. On the other tsite here is the same TreeView more precisely a new TreeView with the same nodes ;) So I would like to keep the expanding state of the first Tree for the second one on the next page. At least the last selected node (path will be saved in query string) should be expanded.
3
10153
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with that. Im trying for about 3 hours but can't get it to work. Thank you!
3
5341
by: Juan Romero | last post by:
Hey guys, Does anyone know how to get the width of of the client area of the treeview control? What I am trying to do is let the users double click on a split control and have the treeview automatically resize (horizontally of course) to show all the content. by default, if something does not fit in the client area, the treeview control adds scrollbars. What I want to do is let the user "auto-expand" the treeview to the point where the...
1
9985
by: James L | last post by:
Hi, I have a treeview that has to be refreshed due to data changes. Is it possible to select the last node that they were viewing when the tree view was been populated once again? I have tried getting the selected node and then expanding it in the refreshed tree view using expand() but it does not do it. Thanks for any help.
2
7500
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView nodes. The TreeView populates dynamically as there are a significant number of nodes. The DataGrid displays both the items and the nodes from the TreeView. Using the explorer analogy this means the TreeView shows folders, and the DataGrid folders...
0
2424
by: jim | last post by:
Hi, I have a TreeView control that sits on the MasterPage. All of my other webpages inherit from that Master Page. The Treeview receives it's data using an XMLDataSource that has it's DataFile property set to the Web.sitemap file. I have turned off the Expand/Collapse icons on the Treeview. I want to be able to single click a node in the tree view to
1
4936
by: doemon | last post by:
Hi, I'm working on a pagination control and I need to dynamically rerender a treeview to display the next set of nodes depending on which page we're on. For example, page 1 will dispaly only nodes 1 to 10, but when the user clicks , the tree will display nodes 11 to 20. Page 1 will is loaded when the page that contains the ascx (parent of the treeview) is loaded. This is all cool. The treeview displays correctly. When I click the ...
0
2505
by: Mark Rae | last post by:
Hi, Adding nodes to a TreeView programatically... 1) Instantiate a TreeNode object and set its SelectAction to TreeNodeSelectAction.Expand. 2) Instantiate another TreeNode object and add it to the first TreeNode's ChildNodes collection.
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.