Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 25th, 2009, 02:52 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default How to sort data with DataList

Hi there
i am trying to build a news feature that displays all news in a DataList,
i have reached this far and have page numbers using the data pager,


on the left of the DataList i have a repeater control that displays category news,

what i want now is when users click the category in on the left DataList should display news from that category Only .



thanks in advance
__________________
bx
  #2 (permalink)  
Old March 25th, 2009, 03:25 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Are you seriously using a DataList? You mention using a DataPager, but DataPager only works with ListView.

Be careful to use precise terms, so that someone can properly help you.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
  #3 (permalink)  
Old March 25th, 2009, 03:49 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

It is ListView ,
__________________
bx
  #4 (permalink)  
Old March 31st, 2009, 05:06 PM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by bex View Post
It is ListView ,

Create hyperlink in your repeater to pass categoryID as a URL Parameter.
In your ObjectDataSource , add <asp:QueryStringParameter inside <SelectParameters> to filter ListView

It should do the trick, If it's not clear i can send you a bit of code.

Last edited by Masil; March 31st, 2009 at 05:08 PM..
  #5 (permalink)  
Old April 1st, 2009, 04:05 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

thanks that is sorted but the data-pager needs to be clicked 2 times in order to work,
how to make this work?

i gave the pager the default value of 10 items per page, if there are 3 items the pager displays as not available. want to not display at all until 10 items are displayed

thanks
__________________
bx
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort data in a data grid? zaheerabbas.sk ASP.NET 1.0 and 1.1 Basics 3 April 10th, 2007 02:37 PM
datagrid does SORT integer data properly chayanvinayak Flash (all versions) 3 July 27th, 2006 02:59 PM
How to sort a column in data grid: kenn_rosie ASP.NET 1.0 and 1.1 Basics 1 January 26th, 2006 02:03 PM
sort data flyfish Access 5 February 7th, 2005 02:51 AM
trying to sort data in excel with vb.net deanna VB How-To 0 March 26th, 2004 04:25 PM



All times are GMT -4. The time now is 09:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.