Howto display an ASP.net datagrid rows as columns and vice versa?

J

Jimmy

Hi

I want to display my datagrid with the columns horizontal and rows vertical,
so just the other way around. For example instead of :

name address city
Tom 200 George Street Sydney

i would like:

name Tom
address 200 George Street
city sydney

ch

Jim
 
E

Elton Wang

Hi Jimmy,

When Rendering to client-side, a datagrid actually is an html table. If your
data is for view only, you can create your own html table based on your
data. It's not big deal to show data horizontally in html table.



HTH



Elton Wang
 
K

Kim Quigley

Instead of having 3 columns (name, address, city), create a template column.
In that column, create a table of two columns and 3 rows with the headings
in the first column and label controls in the second column. Set the text
property of the label controls to

text='<%# Container.DataItem("fieldname")%>'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top