Solved

Any grids that support multiple records per row and allow sorting?

Posted on 2008-06-17
2
372 Views
Last Modified: 2013-11-05
I need to create a product catalog page to display multiple products per row and which supports soring.  The default display will be 5 items per row, sorted by price, like this:

$1  $2  $3  $4  $5
$6  $7  $8  $9  $10
$11  $12  $13  $14  $15
etc.

But I need to allow the products to be sorted by product name also.  None of the grids I've looked at so far seem to handle this, but I wonder if I've just missed the right one.  Thanks!
0
Comment
Question by:NorSoft
2 Comments
 
LVL 22

Accepted Solution

by:
prairiedog earned 125 total points
ID: 21813923
No grids will meet your requirements. Grids (DataGrid, or GridView) are used to display multi-column records. But in your case, there is actually only one column repeated five times per row. You might want to use DataList to accomplish your mission. In your case, add a DataList control to your page, and set DataList1.RepeatColumns = 5, and DataList1.RepeatDirection=Horizontal. The only problem is DataList does not have built-in sorting capacity, but it is not hard to add your own sorting mechanism. Here are some links talking about adding sorting to DataList control:
http://www.dotnetjohn.com/articles.aspx?articleid=95
http://www.asp.net/LEARN/data-access/tutorial-45-cs.aspx
0
 

Author Closing Comment

by:NorSoft
ID: 31467884
Thanks for taking the time to give me an alternate solution!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Automatic sizing of HTML.TextAreaFor based on content 1 26
Problem to go to Web page 2 98
Server Error 11 47
ASP.NET gridview select textbox on focus 2 0
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now