Bubai Banerjee

Bubai Banerjee

  • 1.6k
  • 163
  • 45.8k

Gridview Group Display Horizontally

Feb 14 2013 5:15 AM
I am using Asp.net 4.0 and Sqlserver 2008. I want to fetch record from Database and display it into gridview.I am very new in this system(Freshers).I need it urgently.So please help me if anybody can.Thanks in Advance.
 
Table Structure :
 
CREATE TABLE dbo.DwlEntry
(
Id INT IDENTITY(1,1),
UserName VARCHAR(100),
ConfigItem VARCHAR(100),
Component VARCHAR(100),
TimeLogged DECIMAL(13,2)
)

INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bubai','AFOTA','Documentation','3')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bubai','GENERAL','Troubleshooting','3')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bhanu','AFOTA','CodeChange','3')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bubai','GENERAL','ProjectTraining','1')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bhanu','GENERAL','Troubleshooting','5')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bhanu','AFOTA','CodeChange','1')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bubai','AFOTA','CodeChange','5')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bubai','GENERAL','ProjectTraining','4')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bhanu','AFOTA','Documentation','2')
INSERT INTO dbo.DwlEntry(UserName,ConfigItem,Component,TimeLogged) VALUES('Bhanu','GENERAL','ProjectTraining','4')
 
I want the Result in below way . Config item would be first row. and grouping come Horizontally like below Format

But I want it in this in this below Format : 








ConfigItemAFOTAAFOTAGENERALGENERAL
UserNameDocumentationCodeChangeProjectTrainingTroubleshootingTotal
Bhanu244515
Bubai355316
Total599831


Attachment: for report.zip