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:

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

PropertyGridEditorPart

Provides the class definition of the PropertyGridEditorPart Web server control.

Back to top

Community Additions

ADD
Show: