Friday, 23 August 2013

Grid Parent-Child Unknown

Grid Parent-Child Unknown

I have the following two tables :
Items : ID ParentChildItems : ParentItemId,ChildItemID
both fields in the second table is referencing the ID in the first table.
I have the following data : Items : ITM1 ITM2 ITM3 ITM4 ITM5
ParentChildItems: ITM1 ITM2 ITM1 ITM3 ITM3 ITM4
What this means is that Itm1 is parent of Itm2 and itm3 and itm3 is parent
of itm4. Therefore if i want to check what item1 consist of :then it is
consisting of 2 and 3 and since 3 has 4 so 1 has 4 too!
i want to display the data in a grid so if i selected item 1 the grid
should show :
ITM1
ITM2
ITM3
ITM4.
How to relate the tables so the it displays them correctly, the
parent-child wont work because i don't know how many items will be under a
specific item. I am using janus gridex 3.5 and C# 4.0 and VS 2010.
Thanks in advance.

No comments:

Post a Comment