Discussion Locked

asp.net Datagrid can display in row format

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi!!
iam using asp.net in datagrid i am able to display 4ColoumsFor EX( in DB i have 4 fields p,q,r,s)in datagrid it is displaying in this format

p q r s
p1 q1 r1 s1

but i want the output in format given below

p
q
r
s

can any body help me in this regard...

thanks

abidi

2 replies

by justin james

I do not beleive that the data grid is capable of transposing your data the way you want. My suggestion is to make the pivot within your select, then display the data without headings. You'd need to write a VERY goofy JOIN to get the data laid out the way you want, then UNION those JOINed SELECTs to acheive the pivot.

Better yet, write your own component for this, it would be fairly easy to do so. You'll be sacrificing the functionality of DataGrid, but you'll be able to do what you are looking for.

J.Ja

by jaisonmit

hi,
u can retrive the data in this format by changning the select statement in SQL
thnx

This discussion is closed to new replies.