Link to home
Start Free TrialLog in
Avatar of cimscims
cimscims

asked on

Gridview - Matrix format

I want to display the data in the following format in a gridview whenever a user is selected.

              Username1     Username2     Password
IPAD         XXXXX11        XXXXX21         XXXXXp1
PC1          XXXXX12        XXXXX22         XXXXXp2
PC2          XXXXX13        XXXXX23         XXXXXp3    
PC3          XXXXX14        XXXXX24         XXXXXp4  

I have two tables 1) tblMachines 2)tblPasswords
1) tblMachine -->
     MachineId,
     MachineName
2) tblPasswords -->
     PassId
     UserId
     MachineId
     Username1
     Username2
     Password

Would someone help me. Thanks.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

That looks like a pivot/cross-tab, but you didn't indicate the database that you are using.  That could either be the job for a query, or you could do it in code also.
Avatar of cimscims
cimscims

ASKER

I am using SQL Server 2000. Would you please help me out. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial