PropertyGrid

Wisej.Web.PropertyGrid

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Provides a user interface for browsing the properties of an object.

public class PropertyGrid : Control, IEnumerable<GridItem>, IEnumerable, IReadOnly

Constructors

PropertyGrid()

Initializes a new instance of the PropertyGrid class.

Properties

BorderStyle

BorderStyle: Indicates the border style for the property grid. (Default: None)

BrowsableAttributes

Attribute[]arrow-up-right: Returns or sets the attributes used to filter the properties to display in the PropertyGrid.

ClientArea

Rectanglearrow-up-right: Returns the client rectangle excluding the non-client caption and borders dimensions.

ColumnHeadersVisible

Booleanarrow-up-right: Returns or sets whether the column that contains row headers is displayed. (Default: False)

DefaultPasswordText

Stringarrow-up-right: Defines the default text to display in a PropertyGrid password cell.Since 3.5.18

EditOnEnter

Booleanarrow-up-right: Returns or sets whether the value cell automatically enters edit mode when the row is selected. (Default: True)

HelpVisible

Booleanarrow-up-right: Returns or sets whether the Help text is visible. (Default: True)

Item(index)

GridItem: Returns the GridItem at the specified index.

Item(label)

GridItem: Returns the first GridItem with the matching label.

NameFillWeight

Singlearrow-up-right: Returns or sets the FillWeight the Name column. 50 (%) is the default. (Default: 50)

Throws:

NameTitle

Stringarrow-up-right: Returns or sets the title of the Name column shown when ColumnHeadersVisible is true.

PropertySort

PropertySort: Returns or sets the type of sorting the PropertyGrid uses to display properties. (Default: CategorizedAlphabetical)

ReadOnly

Booleanarrow-up-right: Returns or sets whether the user can edit the values of the SelectedObject. (Default: False)

Throws:

RightClickSelection

Booleanarrow-up-right: Returns or sets whether the grid item under the pointer gets selected on a right click. (Default: False)

RowHeadersVisible

Booleanarrow-up-right: Returns or sets whether the column that contains row headers is displayed. (Default: True)

SelectedGridItem

GridItem: Returns or sets the selected grid item.

SelectedObject

Objectarrow-up-right: Returns or sets the object for which the grid displays properties. (Default: null)

SelectedObjects

Object[]arrow-up-right: Returns or sets the currently selected objects.

Throws:

ShowHelpToolTips

Booleanarrow-up-right: Returns or sets whether the control shows the property description text in a tooltip. (Default: False)

ToolBar

ToolBar: Returns the ToolBar control at the top of the PropertyGrid.

ToolbarVisible

Booleanarrow-up-right: Returns or sets whether the toolbar is visible. (Default: False)

Tools

ComponentToolCollection: Returns the instance of ComponentToolCollection associated with this control.

ToolsPosition

Position: Returns or sets the position of the ComponentTool items associated with this control. (Default: Top)

ValueTitle

Stringarrow-up-right: Returns or sets the title of the Value column shown when ColumnHeadersVisible is true.

Methods

CollapseAllGridItems()

Collapses all the categories in the PropertyGrid.

Dispose(disposing)

Disposes the control.

Parameter
Type
Description

disposing

true when this method is called by the application rather than a finalizer.

ExpandAllGridItems()

Expands all the categories in the PropertyGrid.

GetProperties(objects, attributes)

Returns a list of PropertyDescriptorarrow-up-right used to populate the PropertyGrid.

Parameter
Type
Description

objects

Objects to retrieve the properties from.

attributes

Attributes to filter the properties.

Returns: IList<PropertyDescriptor>arrow-up-right. A list of PropertyDescriptorarrow-up-right objects representing the properties to load into the property grid.

The default implementation uses [GetProperties](https://docs.microsoft.com/dotnet/api/system.componentmodel.typedescriptor.getproperties(system.object,system.attribute) to retrieve the list of public properties from the selected objects.

OnFontChanged(e)

Parameter
Type
Description

OnNameFillWeightChanged(e)

Fires the NameFillWeightChanged event.

Parameter
Type
Description

e

A EventArgsarrow-up-right that contains the event data.

OnPropertySortChanged(e)

Fires the PropertySortChanged event.

Parameter
Type
Description

e

A EventArgsarrow-up-right that contains the event data.

OnPropertyValueChanged(e)

Fires the PropertyValueChanged event.

Parameter
Type
Description

OnPropertyValueDataError(e)

Fires the PropertyValueDataError event.

Parameter
Type
Description

OnPropertyValueFormatting(e)

Fires the PropertyValueFormatting event.

Parameter
Type
Description

OnReadOnlyChanged(e)

Fires the ReadOnlyChanged event.

Parameter
Type
Description

e

An EventArgsarrow-up-right that contains the event data.

OnSelectedGridItemBeginEdit(e)

Fires the SelectedGridItemBeginEdit event.

Parameter
Type
Description

OnSelectedGridItemChanged(e)

Fires the SelectedGridItemChanged event.

Parameter
Type
Description

OnSelectedGridItemEndEdit(e)

Fires the SelectedGridItemEndEdit event.

Parameter
Type
Description

OnSelectedObjectsChanged(e)

Fires the SelectedObjectsChanged event.

Parameter
Type
Description

e

An EventArgsarrow-up-right that contains the event data.

OnToolbarButtonClick(e)

Fires the ButtonClick event.

Parameter
Type
Description

OnToolbarButtonDropDown(e)

Fires the ButtonDropDown event.

Parameter
Type
Description

OnToolClick(e)

Fires the ToolClick event.

Parameter
Type
Description

e

A ToolClickEventArgs that contains the event data.

OnWebRender(config)

Renders the client component.

Parameter
Type
Description

config

Dynamic configuration object.

Refresh()

Reloads the updated values from the current SelectedObject or SelectedObjects.

Refresh(refreshChildren)

Reloads the updated values from the current SelectedObject or SelectedObjects.

Parameter
Type
Description

refreshChildren

True to also refresh all the children of this control.

ResetSelectedProperty()

Resets the selected property to its default value.

Events

NameFillWeightChanged

EventHandlerarrow-up-right Fired when the value o the NameFillWeight property changes.

PropertySortChanged

EventHandlerarrow-up-right Fired when the sort mode is changed.

PropertyValueChanged

PropertyValueChangedEventHandler Fired when a property value changes.

PropertyValueDataError

PropertyValueDataErrorEventHandler Fired when a property value is being changed but it is incompatible with the new value.

PropertyValueFormatting

PropertyValueFormattingEventHandler Fired when the property value is being formatted to be displayed.

ReadOnlyChanged

EventHandlerarrow-up-right Fired when the value of the ReadOnly property has changed.

SelectedGridItemBeginEdit

SelectedGridItemBeginEditEventHandler Fired when the selected GridItem is entering edit mode.

SelectedGridItemChanged

SelectedGridItemChangedEventHandler Fired when the selected GridItem is changed.

SelectedGridItemEndEdit

SelectedGridItemEndEditEventHandler Fired when the selected GridItem exits edit mode.

SelectedObjectsChanged

EventHandlerarrow-up-right Fired when the objects selected by the SelectedObjects property have changed.

ToolbarButtonClick

ToolBarButtonClickEventHandler Fired when a ToolBarButton on the ToolBar is clicked.

ToolbarButtonDropDown

ToolBarButtonClickEventHandler Fired when a drop-down style ToolBarButton or its down arrow is clicked.

ToolClick

ToolClickEventHandler Fired when a ComponentTool is clicked.

Implements

Name
Description

Provides access to the UserData and Tag properties associated to the component implementing this interface.

Bindable components implement this interface.

Controls that support drag & drop operations implement this interface.

Provides access to the ReadOnly property for coontrols that support the read-only mode.

All wisej components implement this interface.

All wisej controls derived from the Control class must implement this interface.

Allows an object to serialize itself.

Last updated

Was this helpful?