SharePoint Pagination – Next 30 items

SCENARIO:

When there are more than 30 items(say, 50 or 100) in SharePoint list or library, it is difficult for users to scroll down the page and select the next set of items through Paging control. To overcome this, some developers prefer to change the item limit to 50 or 100 in modify view page. What if the list contains more than 100 items (imagine 2000 items). In Such cases, we cannot set item limit to 2000 as it will affect the page load performance.

General Position of Paging
General Position of Paging


SOLUTION:

We can move the paging control to the top inorder to navigate to the next 30 items immediately rather than scrolling down the page. To do so, insert the script editor webpart before the list webpart and paste the below code in it

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function()
{
$("#bottomPagingCellWPQ2").insertBefore("table.ms-listviewtable")
});
</script>


RESULT:

Paging control is moved to the top of the list
Paging control is moved to the top of the list

 

We can also bring the paging control at top and bottom positions using the below script:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function()
{
$("#bottomPagingCellWPQ2").clone().insertBefore("table.ms-listviewtable")
});
</script>


RESULT:

Paging control at top and bottom of the list
Paging control at top and bottom of the list

If this post is helpful to you, Please rate the article and provide your valuable feedback.

Advertisements

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s