次の方法で共有


PropertyGridEditorPart Web Server Control Overview

The PropertyGridEditorPart Web server control provides an editor that enables end users to edit custom properties on an associated WebPart control.

This topic contains:

  • Background

  • Code Examples

  • Class Reference

Background

The PropertyGridEditorPart provides a generic user interface (UI) that lets users edit custom properties on WebPart controls and on server controls in WebPartZoneBase zones.

The ability of a PropertyGridEditorPart control to let users edit custom properties sets it apart from other EditorPart controls that edit only existing UI-oriented properties from the WebPart class. Examples of controls that can edit only existing properties include the AppearanceEditorPart and BehaviorEditorPart controls. For more information, see ASP.NET Web Parts Controls.

Declaring Properties Customizable through the PropertyGridEditorPart Control

The PropertyGridEditorPart enables users to edit properties that are marked in the source code with WebBrowsableAttribute. When a property is marked with this attribute, the PropertyGridEditorPart control creates the editing UI based on the type of the property. The PropertyGridEditorPart control uses a PropertyDescriptor object if needed to convert the value in each editing control to the property's type.

For an example of how to mark a property with the WebBrowsable attribute, see the "Example" section of PropertyGridEditorPart. For an example that shows how to use a PropertyGridEditorPart control, see PropertyGridEditorPart Web Server Control Declarative Syntax and System.Web.UI.WebControls.WebParts.PropertyGridEditorPart.

Attributes that Assist the PropertyGridEditorPart Control Editing UI

When you create customizable properties, you can add attributes that help the PropertyGridEditorPart control display the editing UI. Set the WebDisplayNameAttribute to specify the text that is displayed in the editing UI for each control. Set the WebDescriptionAttribute to a string that appears as a tooltip for each control in the editing UI.

Back to top

Code Examples

Walkthrough: Creating a Web Parts Page

How to: Treat a User Control as a Web Parts Control

How to: Provide Optional Web Parts Controls

How to: Enable Users to Import Web Parts Control Settings

How to: Export Web Parts Control Settings

How to: Build and Run the Data-bound Web Parts Control Example

Walkthrough: Changing Display Modes on a Web Parts Page

How to: Set the Display Mode of a Web Parts Page

Walkthrough: Implementing Web Parts Personalization with a User Control

Walkthrough: Implementing Web Parts Personalization using IPersonalizable

How to: Enable Shared Personalization of Web Parts Pages

How to: Disable Web Parts Personalization

How to: Create Personalizable Properties on a Web Parts Control

How to: Remove User Entries from the Personalization Store

How to: Enable Users to Clear Personalization State

How to: Declare a Static Connection between Two Web Parts Controls

Back to top

Class Reference

Back to top

See Also

Reference

System.Web.UI.WebControls.WebParts

AppearanceEditorPart

BehaviorEditorPart

LayoutEditorPart

PropertyGridEditorPart