4

The data from the list is displayed on the page using content editor webpart as a scrolling text. The requirement is whenever the list is updated with new items, the data displayed on the page using CEWP should be updated automatically without a entire page refresh. The script to display the scrolling text is in a text file uploaded into the library and linked to the webpart. I tried using SetTimeout and SetInterval, but nothing is working. Please suggest with available options

Thank You

1
  • 2
    Please post relevant code from that text file. Commented Apr 17, 2015 at 11:50

3 Answers 3

5

SharePoint 2010 introduces a new Ajax option has been added to many webparts to enable auto refresh of webpart without refreshing the entire web page. This feature is available out of the box in SharePoint 2010 and no additional development is required.

How to use Auto Refresh Web parts in SharePoint 2010:

In SharePoint 2010, web parts have a new section in their tool panes - Ajax Options:

enter image description here

The key option is the Enable Asynchronous Automatic Refresh. Checking this will enable the Auto Refresh feature on the webpart. The Auto Refreshing Interval is the time interval in which webpart will get refreshed automatically.

Thanks,

3
  • 2
    Do we have this option available in SharePoint 2013?(SharePoint online)
    – user38433
    Commented Apr 20, 2015 at 5:31
  • 2
    yes you have this option in sharepoint 2013 also Commented Apr 20, 2015 at 11:26
  • 3
    This option is enabled only in data view webpart. Commented Dec 24, 2015 at 10:20
3

Set "Show Manual Refresh Button" setting from previous post and call from Your js script:

jQuery('#MSOZoneCell_WebPartWPQ3').find('#ManualRefresh').click();

Took this solution from another thread.

0

It works for me:

function RefreshWebpart(webpartId)
{
    var webpart = document.querySelector("div[webpartid='" + webpartId + "']");
    var listviewtable = webpart.querySelector("table.ms-listviewtable");
    __doPostBack(listviewtable.id, "cancel");
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.