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

tree controls

Hi to all
I have tree web controls with 3 level nodes
when i create 2 level nodes thers is no problem but when i add the thired
level
this erreur occurs :

Exception Details: System.ArgumentOutOfRangeException: Specified argument
was out of the range of valid values. Parameter name: Index was out of range.
Must be non-negative and less than the size of the collection.

My code :While i < ds.Tables(0).Rows.Count
parentNode = New TreeNode()
parentNode.Text = ds.Tables(0).Rows(i).Item(0)
tree.Nodes.Add(parentNode)
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''
GAdaraID = ds.Tables(0).Rows(i).Item(1)
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''
j = 0
While j < ds.Tables(1).Rows.Count
AdaraID = ds.Tables(1).Rows(j).Item(1)

If AdaraID = GAdaraID Then
childNode = New TreeNode()
childNode.Text = ds.Tables(1).Rows(j).Item(0)
tree.Nodes(i).Nodes.Add(childNode)
End If
KAID = ds.Tables(1).Rows(j).Item(2)
h = 0

While h < ds.Tables(2).Rows.Count
KID = ds.Tables(2).Rows(h).Item(1)
If KID = KAID Then
CChildNode = New TreeNode()
CChildNode.Text = ds.Tables(2).Rows(h).Item(0)
tree.Nodes(i).Nodes(j).Nodes.Add(CChildNode)

End If
h += 1

End While 'end h
j += 1

End While ''end j
i += 1

End While 'end i

////////////////////////////////////
any ideas ??
thanks

Nov 19 '05 #1
0 806

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

Similar topics

1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
0
by: Josema | last post by:
Hi to all, I have a webform.aspx and inside i have a dropdown list with autopostback and a place holder... Depending of the selected index that the user selects in the dropdownlist i load a...
1
by: perspolis | last post by:
Hi all I'm looking for a Combobox that displays tree. Does anyone has a source code for that??? thanks in advance
0
by: Homer J. Simpson | last post by:
A few weeks ago I asked for suggestions on how to persist a tree's node state to cookies, without causing postbacks on each click in the tree. I had a single .aspx file, with a row of buttons on...
0
by: Muhammad Shabbir | last post by:
I faced problem similar to that of Loren Baker. I am developing a course timetable using Genetic Algorithm approach. I have cretaed a class named primitiveGA and instantiated an object of that...
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...
1
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.