Skip to main content
Version: 4.1

PropertyGrid

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

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

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

Constructors​

Instance member PropertyGrid()​

Initializes a new instance of the PropertyGrid class.

Properties​

Instance member BorderStyle​

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

Instance member BrowsableAttributes​

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

Instance member ClientArea​

Rectangle: Returns the client rectangle excluding the non-client caption and borders dimensions.

Instance member ColumnHeadersVisible​

Boolean: Returns or sets whether the column that contains row headers is displayed. (Default: False)

Static member DefaultPasswordText​

String: Defines the default text to display in a PropertyGrid password cell. Since 3.5.18

Instance member EditOnEnter​

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

Instance member HelpVisible​

Boolean: Returns or sets whether the Help text is visible. (Default: True)

Instance member Item(index)​

GridItem: Returns the GridItem at the specified index.

Instance member Item(label)​

GridItem: Returns the first GridItem with the matching label.

Instance member NameFillWeight​

Single: Returns or sets the FillWeight the Name column. 50 (%) is the default. (Default: 50)

Throws:

Instance member NameTitle​

String: Returns or sets the title of the Name column shown when ColumnHeadersVisible is true.

Instance member PropertySort​

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

Instance member ReadOnly​

Boolean: Returns or sets whether the user can edit the values of the SelectedObject. (Default: False)

Throws:

  • InvalidOperationException The specified value when setting this property is true, the current cell is in edit mode, and the current cell contains changes that cannot be committed.
  • Exception The specified value when setting this property would cause the control to enter edit mode, but initialization of the editing cell value failed and either there is no handler for the DataError event or the handler has set the ThrowException property to true. The exception object can typically be cast to type FormatException.

Instance member RightClickSelection​

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

Instance member RowHeadersVisible​

Boolean: Returns or sets whether the column that contains row headers is displayed. (Default: True)

Instance member SelectedGridItem​

GridItem: Returns or sets the selected grid item.

Instance member SelectedObject​

Object: Returns or sets the object for which the grid displays properties. (Default: null)

Instance member SelectedObjects​

Object[]: Returns or sets the currently selected objects.

Throws:

Instance member ShowHelpToolTips​

Boolean: Returns or sets whether the control shows the property description text in a tooltip. (Default: False)

Instance member ToolBar​

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

Instance member ToolbarVisible​

Boolean: Returns or sets whether the toolbar is visible. (Default: False)

Instance member Tools​

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

Instance member ToolsPosition​

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

Instance member ValueTitle​

String: Returns or sets the title of the Value column shown when ColumnHeadersVisible is true.

Methods​

Instance member CollapseAllGridItems()​

Collapses all the categories in the PropertyGrid.

Protected member Dispose(disposing)​

Disposes the control.

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

Instance member ExpandAllGridItems()​

Expands all the categories in the PropertyGrid.

Protected member GetProperties(objects, attributes)​

Returns a list of PropertyDescriptor used to populate the PropertyGrid.

ParameterTypeDescription
objectsObject[]Objects to retrieve the properties from.
attributesAttribute[]Attributes to filter the properties.

Returns: IList<PropertyDescriptor>. A list of PropertyDescriptor 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.

Protected member OnFontChanged(e)​

ParameterTypeDescription
eEventArgs

Protected member OnNameFillWeightChanged(e)​

Fires the NameFillWeightChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnPropertySortChanged(e)​

Fires the PropertySortChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnPropertyValueChanged(e)​

Fires the PropertyValueChanged event.

ParameterTypeDescription
ePropertyValueChangedEventArgsA PropertyValueChangedEventArgs that contains the event data.

Protected member OnPropertyValueDataError(e)​

Fires the PropertyValueDataError event.

ParameterTypeDescription
ePropertyValueDataErrorEventArgsA PropertyValueDataErrorEventArgs that contains the event data.

Protected member OnPropertyValueFormatting(e)​

Fires the PropertyValueFormatting event.

ParameterTypeDescription
ePropertyValueFormattingEventArgsA PropertyValueFormattingEventArgs that contains the event data.

Protected member OnReadOnlyChanged(e)​

Fires the ReadOnlyChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnSelectedGridItemBeginEdit(e)​

Fires the SelectedGridItemBeginEdit event.

ParameterTypeDescription
eSelectedGridItemBeginEditEventArgsA SelectedGridItemBeginEditEventArgs that contains the event data.

Protected member OnSelectedGridItemChanged(e)​

Fires the SelectedGridItemChanged event.

ParameterTypeDescription
eSelectedGridItemChangedEventArgsA SelectedGridItemChangedEventArgs that contains the event data.

Protected member OnSelectedGridItemEndEdit(e)​

Fires the SelectedGridItemEndEdit event.

ParameterTypeDescription
eSelectedGridItemEndEditEventArgsA SelectedGridItemEndEditEventArgs that contains the event data.

Protected member OnSelectedObjectsChanged(e)​

Fires the SelectedObjectsChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnToolbarButtonClick(e)​

Fires the ButtonClick event.

ParameterTypeDescription
eToolBarButtonClickEventArgsA ToolBarButtonClickEventArgs that contains the event data.

Protected member OnToolbarButtonDropDown(e)​

Fires the ButtonDropDown event.

ParameterTypeDescription
eToolBarButtonClickEventArgsA ToolBarButtonClickEventArgs that contains the event data.

Protected member OnToolClick(e)​

Fires the ToolClick event.

ParameterTypeDescription
eToolClickEventArgsA ToolClickEventArgs that contains the event data.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member Refresh()​

Reloads the updated values from the current SelectedObject or SelectedObjects.

Instance member Refresh(refreshChildren)​

Reloads the updated values from the current SelectedObject or SelectedObjects.

ParameterTypeDescription
refreshChildrenBooleanTrue to also refresh all the children of this control.

Instance member ResetSelectedProperty()​

Resets the selected property to its default value.

Events​

Instance member NameFillWeightChanged​

EventHandler Fired when the value o the NameFillWeight property changes.

Instance member PropertySortChanged​

EventHandler Fired when the sort mode is changed.

Instance member PropertyValueChanged​

PropertyValueChangedEventHandler Fired when a property value changes.

Instance member PropertyValueDataError​

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

Instance member PropertyValueFormatting​

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

Instance member ReadOnlyChanged​

EventHandler Fired when the value of the ReadOnly property has changed.

Instance member SelectedGridItemBeginEdit​

SelectedGridItemBeginEditEventHandler Fired when the selected GridItem is entering edit mode.

Instance member SelectedGridItemChanged​

SelectedGridItemChangedEventHandler Fired when the selected GridItem is changed.

Instance member SelectedGridItemEndEdit​

SelectedGridItemEndEditEventHandler Fired when the selected GridItem exits edit mode.

Instance member SelectedObjectsChanged​

EventHandler Fired when the objects selected by the SelectedObjects property have changed.

Instance member ToolbarButtonClick​

ToolBarButtonClickEventHandler Fired when a ToolBarButton on the ToolBar is clicked.

Instance member ToolbarButtonDropDown​

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

Instance member ToolClick​

ToolClickEventHandler Fired when a ComponentTool is clicked.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IReadOnlyProvides access to the ReadOnly property for coontrols that support the read-only mode.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.