Skip to main content

Posts

Showing posts with the label video player Web part

Connect SharePoint Web Parts Programmatically

The task Send data from one Web part to another. Scenario could be like one Web part contain the list of items - say video, images or clothes catalog - and the other Web part displays detailed view of the catalog item. Solution 1. Create Web part which will send data - data producer. 1.1. When the Web part class is created we need to inherit that class from ICellProvider. The class definition will look like the following: public class DataProviderWebPart : Microsoft.SharePoint.WebPartPages.WebPart, ICellProvider { ... } 1.2. Define the following properties: public event CellProviderInitEventHandler CellProviderInit; public event CellReadyEventHandler CellReady; private int _nCellConnectedCount = 0; private string _sCellInput; private string _sCellName; private string _sCellDisplayName; 1.3. Override the following methods: EnsureInterfaces, CanRunAt, PartCommunicationConnect, PartCommunicationInit, PartCommunicationMain, CreateChildControls. public override void EnsureInterfaces() ...