Solved

How to use a Gridview to display data horizontally

Posted on 2010-09-22
4
1,171 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

623 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