Adding sorting ability to a repeater control

This code snippet shows you how to sort a repeater web form control. This is handy when you are using scrollable repeater tables.


DataView dv = ds.Tables[0].DefaultView;
dv.Sort = "firstname asc";
rptUsers.DataSource = dv;
Did you like this? Share it:

No related posts.



2 Responses to “Adding sorting ability to a repeater control”

  1. Chris says:

    Thanks very much, saved me hours of work!

  2. Kasper says:

    NICE! I have been looking for something like this for a long time! thanks

Leave a Reply

You must be logged in to post a comment.