Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to display the records in grid like this


Name xyz abc asd pqr rst
Address 12a 321b 43c 43d 43e
salary 100 200 300 400 500

plz help me out this.
Posted

Hi,

Gridview also suits your requirement

Assuming you are using sql server....

Try Pivot query in sql server and get th data in the above required format and bind it.

For pivot in sql server have a look on the following links



http://blog.sqlauthority.com/2008/06/07/sql-server-pivot-and-unpivot-table-examples/[^]


http://msdn.microsoft.com/en-us/library/ms177410.aspx[^]


Hope this helps....
 
Share this answer
 
Are you sure you want to use GridView? A Repeater looks good for this.

Regards,
Eduard
 
Share this answer
 
Comments
Amod Kumar Jaiswal 11-Dec-11 23:47pm    
i want to do this any how either Repeater or grid view if you know please help me how to do this.
Create datatable dynamically which have the same data schema , and bind it with the grid view
 
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