Hi,
let me explain some about database.
i have one table name called companydetails.
there are two fileds name called COmpanyID, DepartID.
COmpanyID , DEpartID.
1...................1.1
1...................1.2
1...................1.3
1...................1.4
2.......... ........2.1
2...................2.2
2.............. ....2.3
2 ..................2.4
This is my data appear in data base table.
Now my question is now i have to show this data in gridview in a 2 rows like this below.
COmpanyID,dept1,dept2,dept3,dept4
....1...........1.1.....1.2....1.3.....1.4
....2...........2.1.....2.1....2.3.....2.4
Please can you tell me how can i do this in c#.