I want to fetch the projects in the same order as they are displayed in project hierarchy on the form in project management.
I wan to fetch this details from projTable in the same order by using code. I am able to fetch all projects but not in the orders as it displayed in the project form project hierarchy.
Please guide me.
Doesn't sorting by ProjId give you what you want?
Sorting by projid gives me the list but not the actual order of parent and child relationship order.
Why not? What do you get instead?
I just edited the example scenario, let me cross verify the results and come back.
I need the results in parent and child relationship heirarchy.
Yes, and that's what you get by sorting by project ID, wont you? P1 will come first, then P1.1, the P1.1.1, then P1.1.2, the P1.2 and so on.
You keep repeating the same thing without explaining what problem you have. If you never tried the solution, it's indeed time to do it.
Sorting by using projid yeids the expected the result. Thanks a lot Martin.