Solved

How to use a Gridview to display data horizontally

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MYSQL responding very slow 3 48
C# Linq Select From List 3 43
Data organization issue 7 36
Adding where clause to entity statement c# 1 47
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

735 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