ClassRadPropertyGrid
Represents a property grid control that displays object properties in a structured grid format with property names in the first column and their corresponding values in the second column. Provides comprehensive property editing capabilities with support for various data types and custom editors.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
public class RadPropertyGrid : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadPropertyGrid
Implements:
Inherited Members
Constructors
RadPropertyGrid()
Initializes a new instance of the RadPropertyGrid class with default settings.
Declaration
public RadPropertyGrid()
Properties
ActiveEditor
Gets the currently active editor instance used for editing property values.
Declaration
[Browsable(false)]
public IValueEditor ActiveEditor { get; }
Property Value
An IValueEditor representing the active editor, or null if no editor is active.
AllowDefaultContextMenu
Gets or sets a value indicating whether the default context menu is enabled.
Declaration
public bool AllowDefaultContextMenu { get; set; }
Property Value
The default value is false.
AutoExpandGroups
Gets or sets a value indicating whether property groups are automatically expanded when the property grid is populated.
Declaration
[Browsable(true)]
public bool AutoExpandGroups { get; set; }
Property Value
true to automatically expand groups upon creation; otherwise, false. The default value is true.
BeginEditMode
Gets or sets the mode that determines how users can initiate editing of property values.
Declaration
[Browsable(true)]
public RadPropertyGridBeginEditModes BeginEditMode { get; set; }
Property Value
A RadPropertyGridBeginEditModes value specifying the edit initiation mode. The default value is BeginEditOnClick.
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
EnableCustomGrouping
Gets or sets a value indicating whether properties can be grouped programmatically using custom grouping logic.
Declaration
[Browsable(true)]
public bool EnableCustomGrouping { get; set; }
Property Value
true to enable custom grouping; otherwise, false. The default value is false.
EnableFiltering
Gets or sets a value indicating whether filtering is enabled.
Declaration
[Browsable(true)]
public bool EnableFiltering { get; set; }
Property Value
EnableGrouping
Gets or sets a value indicating whether grouping is enabled.
Declaration
[Browsable(true)]
public bool EnableGrouping { get; set; }
Property Value
EnableKineticScrolling
Gets or sets a value indicating whether kinetic scrolling is enabled for smooth touch-based scrolling interactions.
Declaration
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }
Property Value
true to enable kinetic scrolling; otherwise, false. The default value is false.
EnableSorting
Gets or sets a value indicating whether sorting is enabled.
Declaration
[Browsable(true)]
public bool EnableSorting { get; set; }
Property Value
FilterDescriptors
Gets the filter descriptors.
Declaration
[Browsable(false)]
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FindStringComparer
Gets or sets the string comparer used by the keyboard navigation functionality.
Declaration
[Browsable(false)]
public IFindStringComparer FindStringComparer { get; set; }
Property Value
GroupDescriptors
Gets the group descriptors.
Declaration
[Browsable(false)]
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
Groups
Gets the Groups collection.
Declaration
[Browsable(false)]
public PropertyGridGroupItemCollection Groups { get; }
Property Value
HelpBarHeight
Gets or sets the height of the PropertyGridHelpElement.
Declaration
[Browsable(true)]
public float HelpBarHeight { get; set; }
Property Value
HelpVisible
Gets or sets a value indicating whether the PropertyGridHelpElement is visible.
Declaration
[Browsable(true)]
public bool HelpVisible { get; set; }
Property Value
IsEditing
Gets a value indicating whether any property editors are currently active and being edited.
Declaration
[Browsable(false)]
public bool IsEditing { get; }
Property Value
true if there are open editors; otherwise, false.
ItemHeight
Gets or sets the height of the items.
Declaration
[Browsable(true)]
public int ItemHeight { get; set; }
Property Value
The height of the item.
ItemIndent
Gets or sets the width of the indentation of subitems.
Declaration
[Browsable(true)]
public int ItemIndent { get; set; }
Property Value
ItemSpacing
Gets or sets the distance between items of the RadPropertyGridElement.
Declaration
[Browsable(true)]
public int ItemSpacing { get; set; }
Property Value
Items
Gets the Items collection.
Declaration
[Browsable(false)]
public PropertyGridItemCollection Items { get; }
Property Value
KeyboardSearchEnabled
Gets or sets a value that determines whether the user can navigate to an item by typing when RadPropertyGrid is focused.
Declaration
[Browsable(true)]
public bool KeyboardSearchEnabled { get; set; }
Property Value
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
[Browsable(true)]
public int KeyboardSearchResetInterval { get; set; }
Property Value
The default value is 300.
PropertyGridElement
Gets the PropertyGridTableElement of this control.
Declaration
[Browsable(false)]
public PropertyGridElement PropertyGridElement { get; }
Property Value
PropertySort
Gets or sets the mode in which the properties will be displayed in the RadPropertyGrid.
Declaration
[Browsable(true)]
public PropertySort PropertySort { get; set; }
Property Value
RadContextMenu
Gets or sets the shortcut menu associated with the control.
Declaration
public virtual RadContextMenu RadContextMenu { get; set; }
Property Value
ReadOnly
Gets or sets a value indicating whether the property grid is in read-only mode, preventing users from editing property values.
Declaration
[Browsable(true)]
public bool ReadOnly { get; set; }
Property Value
true if the property grid is read-only; otherwise, false. The default value is false.
SelectedGridItem
Gets or sets the PropertyGridTableElement selected item.
Declaration
[Browsable(false)]
public PropertyGridItemBase SelectedGridItem { get; set; }
Property Value
SelectedObject
Gets or sets the object which properties the RadPropertyGrid is displaying.
Declaration
[TypeConverter(typeof(SelectedObjectConverter))]
[Browsable(true)]
public object SelectedObject { get; set; }
Property Value
SelectedObjects
Gets or sets the objects which properties the RadPropertyGrid is displaying.
Declaration
[TypeConverter(typeof(SelectedObjectConverter))]
[Browsable(false)]
public object[] SelectedObjects { get; set; }
Property Value
object[]
SortDescriptors
Gets the sort descriptors.
Declaration
[Browsable(false)]
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortOrder
Gets or sets the sort order of items.
Declaration
[Browsable(true)]
public SortOrder SortOrder { get; set; }
Property Value
ToolbarVisible
Gets or sets a value indicating whether the search box of the RadPropertyGrid should be visible
Declaration
[Browsable(true)]
public bool ToolbarVisible { get; set; }
Property Value
Methods
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
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()
Collapses all the categories in the RadPropertyGrid.
Declaration
public void CollapseAllGridItems()
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Overrides
CreateChildItems(RadElement)
Creates the child elements for the property grid control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent element that will contain the child elements.
Overrides
CreatePropertyGridElement()
Creates the main PropertyGridElement that provides the core functionality for the property grid.
Declaration
protected virtual PropertyGridElement CreatePropertyGridElement()
Returns
A new instance of PropertyGridElement.
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
Overrides
EndEdit()
Commits any changes and ends the edit operation on the current item.
ExpandAllGridItems()
Expands all the categories in the RadPropertyGrid.
Declaration
public void ExpandAllGridItems()
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
Overrides
OnKeyPress(KeyPressEventArgs)
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
e
Overrides
OnLoad(Size)
Notifies that the control is about to be visualized.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
desiredSize
Overrides
OnMouseClick(MouseEventArgs)
Declaration
protected override void OnMouseClick(MouseEventArgs e)
Parameters
e
Overrides
OnMouseDoubleClick(MouseEventArgs)
Declaration
protected override void OnMouseDoubleClick(MouseEventArgs e)
Parameters
e
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
e
Overrides
OnMouseEnter(EventArgs)
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
e
Overrides
OnMouseLeave(EventArgs)
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
e
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
e
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
e
Overrides
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
e
Overrides
OnValidating(CancelEventArgs)
Declaration
protected override void OnValidating(CancelEventArgs e)
Parameters
e
Overrides
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
m
Overrides
Events
ContextMenuOpening
Occurs when opening the context menu.
Declaration
public event PropertyGridContextMenuOpeningEventHandler ContextMenuOpening
Event Value
CreateItem
Occurs when a new item element is going to be created.
Declaration
public event CreatePropertyGridItemEventHandler CreateItem
Event Value
CreateItemElement
Occurs when a new item element is going to be created.
Declaration
public event CreatePropertyGridItemElementEventHandler CreateItemElement
Event Value
CustomGrouping
Fires for custom grouping operation.
Declaration
[Browsable(true)]
public event PropertyGridCustomGroupingEventHandler CustomGrouping
Event Value
Edited
Occurs when editing has been finished.
Declaration
public event PropertyGridItemEditedEventHandler Edited
Event Value
Editing
Occurs when editing is started.
Declaration
public event PropertyGridItemEditingEventHandler Editing
Event Value
EditorInitialized
Occurs when editor is initialized.
Declaration
public event PropertyGridItemEditorInitializedEventHandler EditorInitialized
Event Value
EditorRequired
Occurs when editor is required.
Declaration
public event PropertyGridEditorRequiredEventHandler EditorRequired
Event Value
ItemExpandedChanged
Occurs after the value of the Expanded property of a property grid item is changed.
Declaration
public event RadPropertyGridEventHandler ItemExpandedChanged
Event Value
ItemExpandedChanging
Occurs before the value of the Expanded property of a property grid item is changed.
Declaration
public event RadPropertyGridCancelEventHandler ItemExpandedChanging
Event Value
ItemFormatting
Occurs when the item changes its state and needs to be formatted.
Declaration
public event PropertyGridItemFormattingEventHandler ItemFormatting
Event Value
ItemMouseClick
Occurs when a mouse button is clicked inside a PropertyGridItemElementBase
Declaration
public event RadPropertyGridEventHandler ItemMouseClick
Event Value
ItemMouseDoubleClick
Occurs when a mouse button is double clicked inside a PropertyGridItemElementBase
Declaration
public event RadPropertyGridEventHandler ItemMouseDoubleClick
Event Value
ItemMouseDown
Occurs when the user presses a mouse button over a property grid item.
Declaration
public event PropertyGridMouseEventHandler ItemMouseDown
Event Value
ItemMouseMove
Occurs when the user moves the mouse in the area of a property grid item.
Declaration
public event PropertyGridMouseEventHandler ItemMouseMove
Event Value
PropertyValidated
Fires when a property has finished validating.
Declaration
public event PropertyValidatedEventHandler PropertyValidated
Event Value
PropertyValidating
Fires when a property value is validating.
Declaration
public event PropertyValidatingEventHandler PropertyValidating
Event Value
PropertyValueChanged
Occurs when a property value changes.
Declaration
public event PropertyGridItemValueChangedEventHandler PropertyValueChanged
Event Value
PropertyValueChanging
Occurs when item's value is changing.
Declaration
public event PropertyGridItemValueChangingEventHandler PropertyValueChanging
Event Value
SelectedGridItemChanged
Occurs after the property item is selected.
Declaration
public event RadPropertyGridEventHandler SelectedGridItemChanged
Event Value
SelectedGridItemChanging
Occurs before a property grid item is selected.
Declaration
public event RadPropertyGridCancelEventHandler SelectedGridItemChanging
Event Value
SelectedObjectChanged
Occurs after the selected object is changed.
Declaration
public event PropertyGridSelectedObjectChangedEventHandler SelectedObjectChanged
Event Value
SelectedObjectChanging
Occurs before the selected object is changed.
Declaration
public event PropertyGridSelectedObjectChangingEventHandler SelectedObjectChanging
Event Value
ValueChanged
Fires when the value of an editor changes.
Declaration
[Browsable(true)]
public event EventHandler ValueChanged
Event Value
ValueChanging
Fires before the value in an editor is being changed. The action can be canceled.
Declaration
[Browsable(true)]
public event ValueChangingEventHandler ValueChanging
Event Value