2

I want to manipulate the columns of an external list view (XsltListViewWebPart), however, as the data loads asynchronously I must wait for the data to load and the table to be generated before my code can run.

I assume I need to use a callback but can't find anything.

2
  • Is this 2010 or 2013? For 2013, using JSLink could be an awesome option for you Jun 20, 2013 at 7:41
  • 2010. I ended up just polling for the existence of the table with class ms-listviewtable.
    – Chloraphil
    Jun 20, 2013 at 13:27

1 Answer 1

0

I ended up just polling for the existence of the table containing the data, which will have class ms-listviewtable. (I'm using jQuery here.)

$(function(){
    var intervalId = setInterval(function() {
        if ($('.ms-listviewtable').length > 0) {
            clearInterval(intervalId);
            // Code here
        }
    }, 100);
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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