Solved

show all is not paginating  datapager

Posted on 2010-08-24
5
437 Views
Last Modified: 2012-05-10
I have a listview control asp.net 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.
0
Comment
Question by:TonyReba
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:kaylanreilor
ID: 33518325
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 : http://support.microsoft.com/kb/319401.
0
 
LVL 9

Author Comment

by:TonyReba
ID: 33521130
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
        ListView1.DataBind()
       
    End Sub

Open in new window

0
 
LVL 13

Expert Comment

by:kaylanreilor
ID: 33522084
"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() ?

0
 
LVL 9

Author Comment

by:TonyReba
ID: 33522355
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..

0
 
LVL 9

Accepted Solution

by:
TonyReba earned 0 total points
ID: 33527920
I ended up adding a new listview withs its corresponding satasource and setting visible to false..
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question