show all is not paginating datapager

I have a listview control 3.5 in m web app. I want to have a way to show all the data from my database at the buttonshowall click event, it works fine but since is part of the listview it doesnt sort nor, paginate ,,,, much help is appreciated.
Who is Participating?
TonyRebaConnect With a Mentor Author Commented:
I ended up adding a new listview withs its corresponding satasource and setting visible to false..
You don't give any info on how are you currently trying to sort...
Waiting for some details, here is a generic example from the MS doc :
TonyRebaAuthor Commented:
here is my show all code behind
Protected Sub showallButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showallButton.Click
        ' Show All Results 
        Dim sql As String
        sql = "SELECT [First Name], [Last Name], [Prof Designation],[Specialty], [Specialty2],[Address], [Address2], [City], [State], [Zip], [Phone], [Fax] FROM [tbl_Providers] ORDER BY [Last Name], [Specialty] "
        AccessDataSource2.SelectCommand = sql
    End Sub

Open in new window

"it works fine but since is part of the listview it doesnt sort "
This is a little bit confusing: what is part of the listview? what does work actually?
Also, do you see the page refreshing after calling ListView1.DataBind() ?

TonyRebaAuthor Commented:
Hi, yes I see the first set of names displayed once I clicked on show all but when I clicked next on the pager control I dont see the remainding names..

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.