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 Commented Jun 20, 2013 at 7:41
  • 2010. I ended up just polling for the existence of the table with class ms-listviewtable. Commented 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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.