473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

treeview expand client-side attribute

i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes.Add("onexpand", "javascript:alert(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.NavigateUrl = "javascript:showMenu('Section', " +
rowSection["ContractSectionId"].ToString() + ", " +
rowSection.GetChildRows("SectionToGroup").Length.T oString() + ");";
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 2676
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****@discussions.microsoft.comwrote in message
news:96**********************************@microsof t.com...
>i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes.Add("onexpand", "javascript:alert(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.NavigateUrl = "javascript:showMenu('Section', " +
rowSection["ContractSectionId"].ToString() + ", " +
rowSection.GetChildRows("SectionToGroup").Length.T oString() + ");";
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
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,...
2
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...
4
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...
3
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...
3
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...
1
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...
2
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...
0
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...
1
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...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.