Click here to Skip to main content
15,917,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,
I have 2 tables

1. LabTest_Type

id type charges
1 biochemistry 10
2 urine 120


2. LabTest

id test type_id
1 sugar 1
2 glucose 1
3 sugar 2
4 glucose 2


I want gridview to be displayed as


biochemistry
-sugar
-glucose
urine
-sugar
-glucose


I am developing a windows application.
Please help me
Posted

1 solution

you create a dataset in your code in which you have your 2 datatables LabTest_Type and TabTest. Then you create a parent child relation between these 2 tables, making parent.id = child.type_id.

Once done the above just say myTreeview.Datasource = myDataset.
 
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