473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Display two items in one row in GridView?

Is it possible to display two items in one row in GridView?
For example, a table returns 10 products.
Name Price
p1 1
p2 2
..............
p10 10

In the GridView, can I display like this?
ProductName UnitPrice ProductName UnitPrice
P1 1 P2 2
P3 3 P4 4

Many Thanks
Jerry

Sep 22 '07 #1
1 1876
<DA**@HOTMAIL.COMwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
Is it possible to display two items in one row in GridView?
For example, a table returns 10 products.
Name Price
p1 1
p2 2
.............
p10 10

In the GridView, can I display like this?
ProductName UnitPrice ProductName UnitPrice
P1 1 P2 2
P3 3 P4 4
The webcontrol you need is an <asp:DataList>:
http://msdn2.microsoft.com/en-us/lib...ns(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: maflatoun | last post by:
Hi, I'm wondering if there is a way to bind to datagrid or a gridview the items in an arraylist. These items all have vars such as price, qty..etc? (besides putting in a datagrid or datatable...
2
by: Stephen | last post by:
Hi, Suppose there is a column in the dataset that is a very large field (say varchar(500)) and i want to display partial information with (....) so that the user can click on it to view for...
3
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
2
by: J055 | last post by:
Hi I need to search a number of DataTables within a DataSet (with some relationships) and then display the filtered results in a GridView. The Columns that need to be displayed come from 2 of...
1
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
Hi, I have a problem whereby I have a gridview bound to a dataset with a large number of items, However when I select an item near the bottom by using the scrollbar, when the gridview gets...
0
by: =?Utf-8?B?RnJlZGVyaWMgSHV0b3c=?= | last post by:
I am trying to build a web site using C# 2005 and msSQL, and I am trying to build a page that displays for products : A B C D E F G ... Z # If there is something an item starting with the...
2
by: bogdan | last post by:
Hi, Can a single GridView be 'connected' to DetailsView that renders itself differently based on the currently selected row? I have a GridView with rows that could be displayed in the same way...
19
by: Mel | last post by:
I want to display custom data in some sort of control on a web page. By custom data I mean it's not in a database yet it just resides in a List Box on a different tab . I just want to display the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.