When developing web-parts, it could be useful to understand if the code is running in design mode.
In the post Determine if Your Web Part is in Design Mode I have found this useful tip:
WebPartManager wpm = WebPartManager.GetCurrentWebPartManager(this.Page);
webPartIsInDesignMode = wpm.DisplayMode.AllowPageDesign;
If in your SharePoint installation you are missing a lot of web parts, it is probably because you have to activate the following features:
You can find the features GUIDs in the two previous links, or else in the post Enterprise Features Exposed.
In the article Walkthrough: Creating Connectable Web Parts in SharePoint Foundation there is the complete walkthrough on creating connected web parts in SharePoint.
Anyway, very shortly, the steps to follow are:
- create an interface containing the properties you want to share between the provider and the consumer web-parts, or reuse the existing ones IWebPartTable, IWebPartField, IWebPartRow;
- make the provider web-part implement this interface, assign some values to these properties, and expose a public method with the ConnectionProvider attribute;
- make the consumer web-part implement the same interface, expose a public method with the ConnectionConsumer attribute and use the property values read from the provider interface.
Finally, it's possible to connected the web-parts through AJAX as shown in the blog post Connectable Web part with AJAX functionality Implementation.