asp.net - Showing a DataPager for a ListView only when there are at least 30 records -


I am using listview and datapager controls. In my list view, I have estimated 30 records for thirty records to show more often, then paging arrives, where the rest suspension is shown.

Problem: When I have only 5 records, my paging is shown ( the last 1 next ), though the link buttons are disabled for paging. If I do not exceed the third record I do not want to show paging

Paging should be shown only when one page is more than the records shown, I do not want a ping option

thanks

"post-text" itemprop = "text">

You set a FrontPage property to false on a NextPreviousPagerField in a DataPager control Can hide objects. You can also hide Personal Buttons (First Page, Previous Page, Next Page, and Last-Page Button) by setting the ShowFirstPageButton, ShowPreviousPageButton, ShowNextPageButton, and ShowLastPageButton properties false.

Good luck try it out;) This will probably be

  (results & lt; 30) {DataPager1.Visible = false; }  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -