Solved

How to use a Gridview to display data horizontally

Posted on 2010-09-22
4
1,165 Views
Last Modified: 2012-05-10
I have a list of items which I would like to display on an ASP.Net web form. I am wondering whether it's possible to use the Gridview control to show the items in textboxes side by side as well as row by row, such as:

Name1 Name2 Name3 Name4
Name5 Name6 Name7 Name8
...............................................

and so on.

Thanks

Chris
0
Comment
Question by:CLoucas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 167 total points
ID: 33732255
A grid wouldn't really be suitable for that sort of layout. You would be better off looking at the DataList:

     http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/datalist.aspx
0
 
LVL 12

Assisted Solution

by:jagssidurala
jagssidurala earned 167 total points
ID: 33732284
we can use datalist to display these type of design.

we are having datasource proprety for datalist also as like gridview.

.cs file code
----------------------------
dtList.DataSource = dtName;
dtList.DataBind();

here dtName is a DataTable having result set of Names.

.aspx code
-------------------------
<asp:DataList Id="dtList" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
<ItemTemplate>
<%#Eval("Name")%> //Name is database column name
</ItemTemplate.

</DataList>

0
 
LVL 3

Assisted Solution

by:ashokdudhade
ashokdudhade earned 166 total points
ID: 33732429
Please refer below URL
http://forums.asp.net/t/1354465.aspx
0
 

Author Closing Comment

by:CLoucas
ID: 33759528
Very good and prompt responses, thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question