Export (0) Print
Expand All

HierarchicalDataBoundControlDesigner Class

Provides design-time support in a designer host for the HierarchicalDataBoundControl control.

Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in system.design.dll)

public ref class HierarchicalDataBoundControlDesigner : public BaseDataBoundControlDesigner
public class HierarchicalDataBoundControlDesigner extends BaseDataBoundControlDesigner
public class HierarchicalDataBoundControlDesigner extends BaseDataBoundControlDesigner
Not applicable.

In a designer host, when the user switches from Source to Design view, the markup source code that describes a control that is derived from the HierarchicalDataBoundControl abstract class is parsed and a design-time version of the control is created on the design surface. When the user switches back to Source view, the design-time control is persisted to markup source code and edited into the markup for the Web page. The HierarchicalDataBoundControlDesigner class provides design-time support for controls that are derived from the HierarchicalDataBoundControl in a designer host.

The HierarchicalDataBoundControlDesigner class properties provide the following functionality:

The HierarchicalDataBoundControlDesigner class methods provide the following functionality:

  • The ConnectToDataSource method performs the actions that are necessary to connect to the current data source.

  • The CreateDataSource method creates a new data source for the associated control.

  • The DataBind method binds the associated control that is derived from the HierarchicalDataBoundControl class to a design-time data source.

  • The DisconnectFromDataSource method performs the actions that are necessary to disconnect from the current data source.

  • The GetDesignTimeDataSource method gets a data source that can be used at design time for the associated control.

  • The GetSampleDataSource method constructs a sample data source that can be used at design time for the associated control.

  • The PreFilterProperties method is used to remove properties from or add additional properties to or to shadow properties of the associated control that is derived from the HierarchicalDataBoundControl class.

The following code example shows how to extend the HierarchicalDataBoundControlDesigner class to change the appearance of controls that are derived from the HierarchicalDataBoundControl control at design time.

The example derives the MyHierarchicalDataBoundControl class from the HierarchicalDataBoundControl. The MyHierarchicalDataBoundControl class is simply a copy of the HierarchicalDataBoundControl. The example also derives the MyHierarchicalDataBoundControlDesigner class from the HierarchicalDataBoundControlDesigner class and places a DesignerAttribute object for the MyHierarchicalDataBoundControlDesigner on the MyHierarchicalDataBoundControl class.

The MyHierarchicalDataBoundControlDesigner overrides the PreFilterProperties method to make the NamingContainer property visible in the Properties grid at design time. It overrides the GetDesignTimeHtml method to generate the markup for a placeholder if the design time markup is a null reference (Nothing in Visual Basic) or Empty, or if the design-time markup is an empty <span> block (that is, if there is no inner markup between the <span> and </span> tags).

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft