p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 3.5 Basics (http://p2p.wrox.com/forumdisplay.php?f=351)
-   -   How to sort data with DataList (http://p2p.wrox.com/showthread.php?t=73560)

bex March 25th, 2009 02:52 PM

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

Lee Dumond March 25th, 2009 03:25 PM

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.

bex March 25th, 2009 03:49 PM

[:o] It is ListView ,

Masil March 31st, 2009 05:06 PM

Quote:

Originally Posted by bex (Post 237986)
[:o] 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.

bex April 1st, 2009 04:05 AM

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


All times are GMT -4. The time now is 01:21 PM.

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