1 way of doing this
(i don't know how you want to display it exactly, ill give you 1 possibility
you should be able to work from that)
create a class that holds the data (i would suggest putting the code to
manipulate the data in this class 2)
put your data in a dataset
(code not tested don't shoot me if i have some names wrong)
'building the tree
dim node, node2 as treenode
dim c as yourClass
dim r as datarow
tree.clear
for each r in dataset.tables(0).rows
'create a constructor in your class that handles the vars and cast them
c = new yourClass(r(0),r(1),r(2),r(3),r(4),r(5))
node = new treenode
node.text = r(1)
node.tag = c
for i as integer = 1 to 4
node2 = new treenode
node2.text = r(i)
node.nodes.add(node2)
next
tree.nodes.add(node)
next
now you can use the events of the tree to access your class and manipulate
the data (if you use this you will need to reload the tree)
as i said its 1 way of doing this, i don't like working bound but thats
another option.
hope it helped
eric
[quoted text, click to view] "Kishor" <Kpise@hotmail.com> wrote in message
news:OSumJwlsDHA.1764@TK2MSFTNGP10.phx.gbl...
> Hi,
>
>
>
> In Visual basic6 there are so many grids using which we can display the
tree
> structure (Multiple column). Same thing I am planning to display the
result
> of query in a tree format, instead of grid. I wanted to know how to
convert
> this data grid in to a tree view?. I am using vb.net as a development
> language. I am having records in this format
>
>
>
> ID Colmn1 Colmn2 Colmn3 Colmn4 ParentId.
>
>
>
> First column Id and last column ParentId will be not visible to the user.
>
>
>
> Please suggest me some kind of solution for this.
>
>
>
>
>
> Regards
>
> Kishor
>
>