Class RadPropertyGrid
Displays the properties of an object in a grid with two columns with a property name in the first column and value in the second.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadPropertyGrid : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadPropertyGrid()
Declaration
public RadPropertyGrid()
Properties
ActiveEditor
Gets the active editor.
Declaration
public IValueEditor ActiveEditor { get; }
Property Value
IValueEditor
|
AllowDefaultContextMenu
Gets or sets a value indicating whether the default context menu is enabled.
Declaration
public bool AllowDefaultContextMenu { get; set; }
Property Value
System.Boolean
The default value is false. |
AutoExpandGroups
Gets or sets a value indicating whether the groups will be expanded or collapsed upon creation.
Declaration
public bool AutoExpandGroups { get; set; }
Property Value
System.Boolean
|
AutoSize
Gets or sets whether the edit control is auto-sized
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
BackColor
RadPropertyGrid consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
Declaration
public override Color BackColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
BeginEditMode
Gets or sets a value indicating how user begins editing a cell.
Declaration
public RadPropertyGridBeginEditModes BeginEditMode { get; set; }
Property Value
RadPropertyGridBeginEditModes
|
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
EnableCustomGrouping
Gets or sets a value indicating whether the data can be grouped programmatically.
Declaration
public bool EnableCustomGrouping { get; set; }
Property Value
System.Boolean
|
EnableFiltering
Gets or sets a value indicating whether filtering is enabled.
Declaration
public bool EnableFiltering { get; set; }
Property Value
System.Boolean
|
EnableGrouping
Gets or sets a value indicating whether grouping is enabled.
Declaration
public bool EnableGrouping { get; set; }
Property Value
System.Boolean
|
EnableKineticScrolling
Gets or sets a value indicating whether the kinetic scrolling function is enabled.
Declaration
public bool EnableKineticScrolling { get; set; }
Property Value
System.Boolean
|
EnableSorting
Gets or sets a value indicating whether sorting is enabled.
Declaration
public bool EnableSorting { get; set; }
Property Value
System.Boolean
|
FilterDescriptors
Gets the filter descriptors.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FilterDescriptorCollection
|
FindStringComparer
Gets or sets the string comparer used by the keyboard navigation functionality.
Declaration
public IFindStringComparer FindStringComparer { get; set; }
Property Value
IFindStringComparer
|
ForeColor
RadPropertyGrid consists of multiple visual elements and separate settings are provided to customize their appearance. Current ForeColor property might be ignored.
Declaration
public override Color ForeColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
GroupDescriptors
Gets the group descriptors.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupDescriptorCollection
|
Groups
Gets the Groups collection.
Declaration
public PropertyGridGroupItemCollection Groups { get; }
Property Value
PropertyGridGroupItemCollection
|
HelpBarHeight
Gets or sets the height of the PropertyGridHelpElement.
Declaration
public float HelpBarHeight { get; set; }
Property Value
System.Single
|
HelpVisible
Gets or sets a value indicating whether the PropertyGridHelpElement is visible.
Declaration
public bool HelpVisible { get; set; }
Property Value
System.Boolean
|
IsEditing
Gets a value indicating whether there are currently open editors.
Declaration
public bool IsEditing { get; }
Property Value
System.Boolean
|
ItemHeight
Gets or sets the height of the items.
Declaration
public int ItemHeight { get; set; }
Property Value
System.Int32
The height of the item. |
ItemIndent
Gets or sets the width of the indentation of subitems.
Declaration
public int ItemIndent { get; set; }
Property Value
System.Int32
|
Items
Gets the Items collection.
Declaration
public PropertyGridItemCollection Items { get; }
Property Value
PropertyGridItemCollection
|
ItemSpacing
Gets or sets the distance between items of the RadPropertyGridElement.
Declaration
public int ItemSpacing { get; set; }
Property Value
System.Int32
|
KeyboardSearchEnabled
Gets or sets a value that determines whether the user can navigate to an item by typing when RadPropertyGrid is focused.
Declaration
public bool KeyboardSearchEnabled { get; set; }
Property Value
System.Boolean
The default value is false. |
KeyboardSearchResetInterval
Gets or sets a value that specifies how long the user must wait before searching with the keyboard is reset.
Declaration
public int KeyboardSearchResetInterval { get; set; }
Property Value
System.Int32
The default value is 300. |
PropertyGridElement
Gets the PropertyGridTableElement of this control.
Declaration
public PropertyGridElement PropertyGridElement { get; }
Property Value
PropertyGridElement
|
PropertySort
Gets or sets the mode in which the properties will be displayed in the RadPropertyGrid.
Declaration
public PropertySort PropertySort { get; set; }
Property Value
System.Windows.Forms.PropertySort
|
RadContextMenu
Gets or sets the shortcut menu associated with the control.
Declaration
public virtual RadContextMenu RadContextMenu { get; set; }
Property Value
RadContextMenu
|
ReadOnly
Gets or sets a value indicating whether the user is allowed to edit the values of the properties.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
SelectedGridItem
Gets or sets the PropertyGridTableElement selected item.
Declaration
public PropertyGridItemBase SelectedGridItem { get; set; }
Property Value
PropertyGridItemBase
|
SelectedObject
Gets or sets the object which properties the RadPropertyGrid is displaying.
Declaration
public object SelectedObject { get; set; }
Property Value
System.Object
|
SelectedObjects
Gets or sets the objects which properties the RadPropertyGrid is displaying.
Declaration
public object[] SelectedObjects { get; set; }
Property Value
System.Object[]
|
SortDescriptors
Gets the sort descriptors.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortDescriptorCollection
|
SortOrder
Gets or sets the sort order of items.
Declaration
public SortOrder SortOrder { get; set; }
Property Value
System.Windows.Forms.SortOrder
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
ToolbarVisible
Gets or sets a value indicating whether the search box of the RadPropertyGrid should be visible
Declaration
public bool ToolbarVisible { get; set; }
Property Value
System.Boolean
|
Methods
BeginEdit()
Puts the current item in edit mode.
Declaration
public void BeginEdit()
BestFit()
Uses a mechanism to maximize the visible strings in both columns of RadPropertyGrid.
Declaration
public void BestFit()
BestFit(PropertyGridBestFitMode)
Best fits the column(s) of RadPropertyGrid using the given mode.
Declaration
public void BestFit(PropertyGridBestFitMode mode)
Parameters
PropertyGridBestFitMode
mode
The mode that determines the mechanism used for best fitting. |
CancelEdit()
Close the currently active editor and discard changes.
Declaration
public void CancelEdit()
CollapseAllGridItems()
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject
|
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
CreatePropertyGridElement()
Declaration
protected virtual PropertyGridElement CreatePropertyGridElement()
Returns
PropertyGridElement
|
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
EndEdit()
Commits any changes and ends the edit operation on the current item.
Declaration
public bool EndEdit()
Returns
System.Boolean
true if successful. |
ExpandAllGridItems()
IsInputKey(Keys)
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
Overrides
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Overrides
OnKeyPress(KeyPressEventArgs)
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Overrides
OnLoad(Size)
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size
desiredSize
|
Overrides
OnMouseClick(MouseEventArgs)
Declaration
protected override void OnMouseClick(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
OnMouseDoubleClick(MouseEventArgs)
Declaration
protected override void OnMouseDoubleClick(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseEnter(EventArgs)
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnMouseLeave(EventArgs)
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnValidating(CancelEventArgs)
Declaration
protected override void OnValidating(CancelEventArgs e)
Parameters
System.ComponentModel.CancelEventArgs
e
|
ProcessDialogKey(Keys)
Declaration
protected override bool ProcessDialogKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
ResetSelectedProperty()
Resets the selected property to its default value.
Declaration
public void ResetSelectedProperty()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message
m
|
Overrides
Events
ContextMenuOpening
Occurs when opening the context menu.
Declaration
public event PropertyGridContextMenuOpeningEventHandler ContextMenuOpening
Event Type
PropertyGridContextMenuOpeningEventHandler
|
CreateItem
Occurs when a new item element is going to be created.
Declaration
public event CreatePropertyGridItemEventHandler CreateItem
Event Type
CreatePropertyGridItemEventHandler
|
CreateItemElement
Occurs when a new item element is going to be created.
Declaration
public event CreatePropertyGridItemElementEventHandler CreateItemElement
Event Type
CreatePropertyGridItemElementEventHandler
|
CustomGrouping
Fires for custom grouping operation.
Declaration
public event PropertyGridCustomGroupingEventHandler CustomGrouping
Event Type
PropertyGridCustomGroupingEventHandler
|
Edited
Occurs when editing has been finished.
Declaration
public event PropertyGridItemEditedEventHandler Edited
Event Type
PropertyGridItemEditedEventHandler
|
Editing
Occurs when editing is started.
Declaration
public event PropertyGridItemEditingEventHandler Editing
Event Type
PropertyGridItemEditingEventHandler
|
EditorInitialized
Occurs when editor is initialized.
Declaration
public event PropertyGridItemEditorInitializedEventHandler EditorInitialized
Event Type
PropertyGridItemEditorInitializedEventHandler
|
EditorRequired
Occurs when editor is required.
Declaration
public event PropertyGridEditorRequiredEventHandler EditorRequired
Event Type
PropertyGridEditorRequiredEventHandler
|
ItemExpandedChanged
Occurs after the value of the Expanded property of a property grid item is changed.
Declaration
public event RadPropertyGridEventHandler ItemExpandedChanged
Event Type
RadPropertyGridEventHandler
|
ItemExpandedChanging
Occurs before the value of the Expanded property of a property grid item is changed.
Declaration
public event RadPropertyGridCancelEventHandler ItemExpandedChanging
Event Type
RadPropertyGridCancelEventHandler
|
ItemFormatting
Occurs when the item changes its state and needs to be formatted.
Declaration
public event PropertyGridItemFormattingEventHandler ItemFormatting
Event Type
PropertyGridItemFormattingEventHandler
|
ItemMouseClick
Occurs when a mouse button is clicked inside a PropertyGridItemElementBase
Declaration
public event RadPropertyGridEventHandler ItemMouseClick
Event Type
RadPropertyGridEventHandler
|
ItemMouseDoubleClick
Occurs when a mouse button is double clicked inside a PropertyGridItemElementBase
Declaration
public event RadPropertyGridEventHandler ItemMouseDoubleClick
Event Type
RadPropertyGridEventHandler
|
ItemMouseDown
Occurs when the user presses a mouse button over a property grid item.
Declaration
public event PropertyGridMouseEventHandler ItemMouseDown
Event Type
PropertyGridMouseEventHandler
|
ItemMouseMove
Occurs when the user moves the mouse in the area of a property grid item.
Declaration
public event PropertyGridMouseEventHandler ItemMouseMove
Event Type
PropertyGridMouseEventHandler
|
PropertyValidated
Fires when a property has finished validating.
Declaration
public event PropertyValidatedEventHandler PropertyValidated
Event Type
PropertyValidatedEventHandler
|
PropertyValidating
Fires when a property value is validating.
Declaration
public event PropertyValidatingEventHandler PropertyValidating
Event Type
PropertyValidatingEventHandler
|
PropertyValueChanged
Occurs when a property value changes.
Declaration
public event PropertyGridItemValueChangedEventHandler PropertyValueChanged
Event Type
PropertyGridItemValueChangedEventHandler
|
PropertyValueChanging
Occurs when item's value is changing.
Declaration
public event PropertyGridItemValueChangingEventHandler PropertyValueChanging
Event Type
PropertyGridItemValueChangingEventHandler
|
SelectedGridItemChanged
Occurs after the property item is selected.
Declaration
public event RadPropertyGridEventHandler SelectedGridItemChanged
Event Type
RadPropertyGridEventHandler
|
SelectedGridItemChanging
Occurs before a property grid item is selected.
Declaration
public event RadPropertyGridCancelEventHandler SelectedGridItemChanging
Event Type
RadPropertyGridCancelEventHandler
|
SelectedObjectChanged
Occurs after the selected object is changed.
Declaration
public event PropertyGridSelectedObjectChangedEventHandler SelectedObjectChanged
Event Type
PropertyGridSelectedObjectChangedEventHandler
|
SelectedObjectChanging
Occurs before the selected object is changed.
Declaration
public event PropertyGridSelectedObjectChangingEventHandler SelectedObjectChanging
Event Type
PropertyGridSelectedObjectChangingEventHandler
|
ValueChanged
Fires when the value of an editor changes.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Fires before the value in an editor is being changed. The action can be canceled.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|