Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Sorting a dataset displayed using a repeater

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Chalk - 24 Oct 2005 13:49 GMT
I am displaying a dataset using a Repeater. I would like to allow the user
to click on a column header and have the data sort by that column. How do I
go about this?

Does anyone know of any example code?

Many thanks.
Cowboy (Gregory A. Beamer) - MVP - 24 Oct 2005 14:22 GMT
You will have to hand code this functionality, as there is no built in
mechanism, like the DataGrid.

To do so, the easiest method is link buttons in the header template that
have the field name and then resorting the DataTable in that order.

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

> I am displaying a dataset using a Repeater. I would like to allow the user
> to click on a column header and have the data sort by that column. How do I
[quoted text clipped - 3 lines]
>
> Many thanks.
Andrew Chalk - 24 Oct 2005 14:48 GMT
Thanks. In that case can I get the advantage of Repeater (in this case
formatting of the data in each column) in a datagrid?

Andrew

> You will have to hand code this functionality, as there is no built in
> mechanism, like the DataGrid.
[quoted text clipped - 11 lines]
>>
>> Many thanks.
Patrick.O.Ige - 24 Oct 2005 14:36 GMT
Andrew there ia an example here at:-
http://aspnet.4guysfromrolla.com/articles/020905-1.aspx
Hope that helps
Patrick

> I am displaying a dataset using a Repeater. I would like to allow the user
> to click on a column header and have the data sort by that column. How do I
[quoted text clipped - 3 lines]
>
> Many thanks.
Andrew Chalk - 24 Oct 2005 14:49 GMT
Thanks, I'll take a look.

Andrew
> Andrew there ia an example here at:-
> http://aspnet.4guysfromrolla.com/articles/020905-1.aspx
[quoted text clipped - 10 lines]
>>
>> Many thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.