Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page using javascript, just not sure if this is possible or where I could find more information about the web part definition piece.

appreciate any help with this. I have tried exporting a content query web part and deciphering the node names/ids, but ContentByQueryWebPart is not a type that can be imported using this approach. I have tried to find information of the definition piece but have not been able to find anything.

share|improve this question

1 Answer 1

Add the List View Web Part to a page, set the properties how you want them, and then export the XML using the web part's dropdown menu. If Export isn't included in the menu, change the Export Mode property (Advanced tab) of the Web Part.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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