Online Training On SharePoint

Friday, 20 January 2012

Refreshing the WebParts Automatically on a Regular Interval

I was working on requirements to create a Dashboard kind of functionality for the Application Admins where data from several Lists and Document Libraries needs to come. Since this application involves high transactions so all these lists keep updated frequently. On this dashboard we are showing the data from these various lists using the list view web parts. The requirement was that we need to refresh these Web Part on a continuous basis automatically so that the users do not need to refresh the pages manually.

This is possible to do OOB with the List/Document Library Web Part in SharePoint 2010 - a really amazing feature. Now these Web Parts supports Ajax Feature with that we can refresh only these Web Parts without refreshing the whole Page. We can also configure these Web Parts to refresh automatically on a set interval without refreshing the whole page on which they are placed.

Below is all the new options which we have with these Web Parts:

To enable these web parts to automatically load the data we need to work with the two properties highlighted in the above picture.

The Enable Asynchronous Automatic Refresh option allows the web  parts to refresh at the interval which you can configure from the Automatic Refreshing Interval field. By default this value is set to to 60 Seconds but you can change this value as per your needs.

The other interesting thing is Show Manual Refresh Button. This allows you to have a additional refresh button on the web part allowing you to refresh only the Web Part manually rather than the whole page.

We can also improve the initial page load time with the option Enable Asynchronous Load. If we have multiple web parts on the page this is good option to be enabled. Once we enable it the Web Part will initially be displayed without any data in it. But once the page is loaded, the Web Part will asynchronously get the data and display. So all this data will be loaded once the page is loaded decreasing the initial page load time.

No comments:

Related Posts with Thumbnails