virlinz
May 14th, 2005, 05:42 AM
Hi,
Normally when we display a table from database by using a datagrid our table will have many columns according to the number of columns in the original table.
I'd like to set the datagrid to display the content of a database table in two columns only: one for the column name and the other one is for the content of each columns.. For example I want to display these details from a table in a datagrid:
Title:ASP.NET
Author: virlinz
Published by:virlinz inc
where Title, Author, Published by are the column names and ASP.NET, virlinz and virlinz inc are the content of the columns. I'd like the column names to be on one side and the contents to be on the other side.
For a real world example, the Friendster website has this kind of layout when viewing a friend's profile.
My question is how to change the datagrid layout? Is it by changing the property of the datagrid or should I create a custom datagrid? I'm a newbie in ASP.NET. Any suggestions are greatly appreciated.
Thanks in advance!
Normally when we display a table from database by using a datagrid our table will have many columns according to the number of columns in the original table.
I'd like to set the datagrid to display the content of a database table in two columns only: one for the column name and the other one is for the content of each columns.. For example I want to display these details from a table in a datagrid:
Title:ASP.NET
Author: virlinz
Published by:virlinz inc
where Title, Author, Published by are the column names and ASP.NET, virlinz and virlinz inc are the content of the columns. I'd like the column names to be on one side and the contents to be on the other side.
For a real world example, the Friendster website has this kind of layout when viewing a friend's profile.
My question is how to change the datagrid layout? Is it by changing the property of the datagrid or should I create a custom datagrid? I'm a newbie in ASP.NET. Any suggestions are greatly appreciated.
Thanks in advance!