AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Can I order paged results horizontally using pager from local lesson?
Posted by Charlie Childs on  4/23/2010 8:22:13 AM Category: ADO.NET
Add to my favorites
Email to friend

Hi,

I used VWD 2008 Express to build a pager from Moderator1's Lesson which is located here - http://www.aspdotnetcodes.com/DataList_Dynamic_Paging_PagedDataSource.aspx.

My datalist displays horiziontally - 4 images + lable per row. Is it possible for the images to be ordered horizontally first and then verically?

For example - page is set to return 20 results per page - so 5 rows.
The furtherst left column has Alfred, Anthony, Brian, Baz and Charlie in that order vertically.
The next column has Christine, David, Edward, Fred and Harry in that order vertically.
The next column has Isabelle, Jake, Lizzy, Mandy and Nick in that order vertically.
The next column has Ozzie, Paul, Robin, Steve and Trevor in that order vertically.
So the order is going from top to bottom then left to right - meaning that the fiirst row will show - Alfred, Christine, Isabelle and Ozzie.

Is there any way to order the results by going left to right and then top to bottom. This is how results were ordered before adding the pager to the page.
Like :-
Top row = Alfred, Anthony, Brian, Baz
Next row = Charlie, Christine, David, Edward
Next row = Fred, Harry, Isabelle, Jake,
Next row = Lizzy, Mandy etc. etc.

ASPDOTNETCODES pager lesson is the first time I have used C#. I have only been learning programming for 3 months in spare time and with VB before attemting that lesson. I am seriously pleased but also seriously heady. An answer of whether this is possible would be appreciated. Assistance would be greately appreciated.

The only part of the pager lesson which mentions rows and columns is this:-

private void doPaging()
{
DataTable dt = new DataTable();
dt.Columns.Add("PageIndex");
dt.Columns.Add("PageText");
for (int i = 0; i < pds.PageCount; i++)
{
DataRow dr = dt.NewRow();
dr[0] = i;
dr[1] = i + 1;
dt.Rows.Add(dr);
}

dlPaging.DataSource = dt;
dlPaging.DataBind();
}

Post Your Reply Post New Question

 Viewer's Reply
SORTED
Answered By Charlie Childs on 4/23/2010 10:22:58 AM
Sorry for any inconvenience. Original datalist properties were showing as set to vertical.

EXCELLENT pager. Thankyou.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Windows 8: 50 Questions and Answers You Need to Make a Decision (Normally $9.95)
Web Application Security — How to Minimize Prevalent Risk of Attacks
Sexy Web Design - Free 71 Page Preview!