We've realised that XsltListViewWebPart can render content in two different modes.

1) if we add XsltListViewWebPart by SharePoint Designers on aspx page - we have plain html render on the page 2) if we use XsltListViewWebPart by c# code on custom aspx page (set ListIs and ViewId) - we have some js script on page which asynch load and build UI

Because of this difference we have problems with our custom aspx page with XsltListViewWebPart in modal dialog mode (we show them with SP.UI.ModalDialog.showModalDialog). SP.UI.ModalDialog.showModalDialog can't calculate and get right height for page with XsltListViewWebPart in case (2) - cause it builds with js but everything is OK in case (1).

So, we've look at XsltListViewWebPart control in our aspx page in debug and realised that it have just two controls inside - SPDataSource and asp.net literal control with js code.

Is there any solution for render XsltListViewWebPart as plain html code not as some js+asyncg load?

  • Can you share or point out to your solution? – diogoxluis May 20 '13 at 15:44

Ok, we've found XsltListViewWebPart.InitialAsyncDataFetch flag which provide optional data load by js-code (asynch) or by creating plain-html code (synch).

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.