Reference: Most important base classes - ProviderControlPanel class

Reference: Most important base classes - ProviderControlPanel class

Posted on April 22, 2009 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

[This post is part of the developer's manual preview published on this blog. You can find temporary TOC here.]

 

ProviderControlPanel is a specialized ControlPanel class which comes with built-in infrastructure for the modules that support multiple providers. If your module supports multiple providers (see provider model pattern), your control panel class should inherit from the ProviderControlPanel and not from ControlPanel class, as it is demonstrated in this sample:

public class BlogsControlPanel : ProviderControlPanel<BlogsControlPanel> 
The ProviderControlPanel class will give you the built-in selector for all the providers that have been defined for the module. The following image depicts this functionality:

ProviderControlPanel inherits from ControlPanel class, which inherits from ViewModeControl class, so you can use references for these classes when working with ProviderControlPanel.

 

Properties


  • string ProviderName
    Gets or sets the name of the data provider that will be used to retrieve and manipulate data. The built-in selector will automatically set this property when user changes the provider through  the user interface.
  • string ProviderSelectorPanelTitle
    Gets or sets the title of the panel containing the data provider selector. Usually this is the first command panel on the top right side of the control panel.

Methods


  • ICommandPanel CreateProviderSelectorPanel()
    This method is in charge of creating the provider selector panel and indicates the currently selected provider. This method can be overridden in case that implementation should be different.
  • string GetDefaultProviderName()
    Gets the default provider name for the module. This method should always be overridden on the actual implementation of the control panel and name of the default provider should be returned.
  • string[] GetProviderNames()
    Gets the array of all provider names supported by this module. This method should always be overridden on the actual implementation of the control panel and names of all providers supported by the module should be returned as an string array.
progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments

Comments are disabled in preview mode.
Topics

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation