Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
1.08/5 (7 votes)
See more:
                                        A
                                    /        \
                                  B            C
                                /    \       /    \
                              D       E     F      G
                             / \     / \   / \    / \
                            H   I    J  K         N  O
                            ....     ....       .... ...
                            ....     ....       .... ...
Output: 
Left gridview of member A:             
1| B |joining date|
2| D |joining date|
3| E |joining date|
4| H |joining date|
5| I |joining date|
6| J |joining date|
7| K |joining date|

Right gridview of member A:             
1| C |joining date|
2| F |joining date|
3| G |joining date|
4| N |joining date|
5| O |joining date|

Note: All left members of A must be in left and all right members must be in right.

datatable schema is

id SponsorId joining-date placement
B    A        21-3-2015    Left
C    A        21-3-2015    Right
D    B        21-3-2015    Left
E    B        21-3-2015    Left
F    C        21-3-2015    Left
G    C        21-3-2015    Left
and similar for all.
Posted
Updated 21-Mar-15 20:38pm
v4
Comments
Sergey Alexandrovich Kryukov 21-Mar-15 0:32am    
Don't you think tree structure should be shown in tree view, not grid view?
In all cases, you cannot expect that someone writes code for you and do your job, especially without any sensible specifications.
—SA
PIEBALDconsult 21-Mar-15 1:02am    
+5
Sergey Alexandrovich Kryukov 21-Mar-15 1:39am    
Thank you. :-)
—SA
Monika Rangta 21-Mar-15 2:56am    
Have a look over, http://aumbusiness.biz/Login.aspx?ReturnUrl=%2f
username: aum544868
password: kavita

And then Genealogy=> Userleftright report
Tejas Vaishnav 21-Mar-15 1:02am    
do you mean we code in c# and SQL to achive your goal? and send you?

1 solution

Grid is for tabular data and not for tree-structured data...For such there is a TreeView[^] control...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900