473,387 Members | 1,453 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,387 software developers and data experts.

i.e Treeview getChildren method working only when nodes are expanded

rao
I am trying to get sub nodes for for clicked node using getChildren()
method as shown below. I am getting javascript exception error
(subtree.null )when nodes are not expanded. The code works only when
nodes are expanded.
any help is greatly appreciated. I am getting this error while
accessing the
property currentChild.getAttribute("Text").

Thanks
rao
Thanks
rao

<SCRIPT language="jscript">
// Walk through the tree.
function walkChildren(arrayChildren){
var currentChild;
for (var i = 0; i < arrayChildren.length; i++){
currentChild = arrayChildren[i];
childrenDIV.innerText += "[" +
currentChild.getAttribute("Text") + "]";
walkChildren(currentChild.getChildren());
}
}
</SCRIPT>
Nov 18 '05 #1
0 1307

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

Similar topics

2
by: Eamon Millman | last post by:
Greetings, I'm fairly new to the new ASP.NET 2.0 controls and I'm trying to get the TreeView control to display some non-xml/sitemap data I want to have in a tree format. To accomplish this...
3
by: Shawn | last post by:
Hi. I'm working with the TreeView control in my ASP.NET 1.1 application. I have a problem I haven't been able to figure out. When I click on a node (not expand), whether it's a parent node, a...
1
by: James Coleman | last post by:
I am using the TreeView control in ASP.NET 2.0 and like it. However, our sitebuilders aren't too pleased with the idea of the table that gets rendered. They are big into avoiding <table> tags...
2
by: JayC | last post by:
hello all, New programmer to the .net world. I am working with VS.net 2005 using VB. So here goes. I am trying to figure out how the treeview control works from a programming perspective. I...
0
by: JJ | last post by:
I need to rebuild/redraw a treeview, following some user actions on the files/folders that the treeview is displaying (renaming or adding/deleting folders/files). When these actions take place I...
2
by: casManG | last post by:
I am working on a small project that uses the treeview control in vb.net 2003. I have a tree view that I am sending to a sub in order to iterate through the nodes. Public Sub test (ByVal...
1
by: echuck66 | last post by:
Hi, I have a Winforms 2.0 project that I'm working on that involves populating a treeview control from data contained in a fairly large dataset that has to be refreshed periodically. I have no...
6
by: =?Utf-8?B?ZHNoZW1lc2g=?= | last post by:
Hello, I have a windows form with a TreeView control. When I first open the tree all nodes are colapsed. Then, I expand some of them and close the form. When I call Form.showDialog() once again...
5
by: Max2006 | last post by:
Hi, I have a TreeView and this is my node style: <asp:TreeNodeStyle ForeColor = "#000000" Font-Size="9px" Font-Bold="false" Width="100px" NodeSpacing="3px" /> The problem is the expand...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...

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.