Is there anyway to use the object model to display a list of all web parts installed (say in a list box)? If so would it then be possible to render that web part on a page if it were selected?
|
You can enumerate /_catalogs/wp files, this way (code to run in your own webpart):
Or you can also use And to add the imported webpart to the page, you should use SPLimitedWebPartManager.AddWebPart method in postback (all the webpart properties will have their default values, unless you initialize them manually before adding to the page). Additional references: |
||||
|
|
|
Do you need something other than the Web Part Gallery and it's preview functionality? |
|||||||||
|
|
I asked a similar question about WSS 3.0 / MOSS 2007. The answer I found should still be relevant for 2010 I think. It will enable you to enumerate the web parts in the catalog and then instantiate each one and add it to a web part page if you wanted. Preview thumbnails would be nice... |
|||
|
|