Gridview Group Display Horizontally

Posted by Bubaibanerjee under ASP.NET on 2/14/2013 | Points: 10 | Views : 1145 | Status : [Member] | Replies : 0
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 :

ConfigItem AFOTA AFOTA GENERAL GENERAL
UserName Documentation CodeChange ProjectTraining Troubleshooting Total
Bhanu 2 4 4 5 15
Bubai 3 5 5 3 16
Total 5 9 9 8 31




Responses

(No response found.)

Login to post response