RadPropertyGrid
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
Initializes a new instance of the RadPropertyGrid class with default settings.
public RadPropertyGrid()
Properties
Gets the currently active editor instance used for editing property values.
[Browsable(false)]
public IValueEditor ActiveEditor { get; }
An IValueEditor representing the active editor, or null if no editor is active.
Gets or sets a value indicating whether the default context menu is enabled.
public bool AllowDefaultContextMenu { get; set; }
The default value is false.
Gets or sets a value indicating whether property groups are automatically expanded when the property grid is populated.
[Browsable(true)]
public bool AutoExpandGroups { get; set; }
true to automatically expand groups upon creation; otherwise, false. The default value is true.
Gets or sets the mode that determines how users can initiate editing of property values.
[Browsable(true)]
public RadPropertyGridBeginEditModes BeginEditMode { get; set; }
A RadPropertyGridBeginEditModes value specifying the edit initiation mode. The default value is BeginEditOnClick.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets a value indicating whether properties can be grouped programmatically using custom grouping logic.
[Browsable(true)]
public bool EnableCustomGrouping { get; set; }
true to enable custom grouping; otherwise, false. The default value is false.
Gets or sets a value indicating whether filtering is enabled.
[Browsable(true)]
public bool EnableFiltering { get; set; }
Gets or sets a value indicating whether grouping is enabled.
[Browsable(true)]
public bool EnableGrouping { get; set; }
Gets or sets a value indicating whether kinetic scrolling is enabled for smooth touch-based scrolling interactions.
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }
true to enable kinetic scrolling; otherwise, false. The default value is false.
Gets or sets a value indicating whether sorting is enabled.
[Browsable(true)]
public bool EnableSorting { get; set; }
Gets the filter descriptors.
[Browsable(false)]
public FilterDescriptorCollection FilterDescriptors { get; }
Gets or sets the string comparer used by the keyboard navigation functionality.
[Browsable(false)]
public IFindStringComparer FindStringComparer { get; set; }
Gets the group descriptors.
[Browsable(false)]
public GroupDescriptorCollection GroupDescriptors { get; }
Gets the Groups collection.
[Browsable(false)]
public PropertyGridGroupItemCollection Groups { get; }
Gets or sets the height of the PropertyGridHelpElement.
[Browsable(true)]
public float HelpBarHeight { get; set; }
Gets or sets a value indicating whether the PropertyGridHelpElement is visible.
[Browsable(true)]
public bool HelpVisible { get; set; }
Gets a value indicating whether any property editors are currently active and being edited.
[Browsable(false)]
public bool IsEditing { get; }
true if there are open editors; otherwise, false.
Gets or sets the height of the items.
[Browsable(true)]
public int ItemHeight { get; set; }
The height of the item.
Gets or sets the width of the indentation of subitems.
[Browsable(true)]
public int ItemIndent { get; set; }
Gets the Items collection.
[Browsable(false)]
public PropertyGridItemCollection Items { get; }
Gets or sets the distance between items of the RadPropertyGridElement.
[Browsable(true)]
public int ItemSpacing { get; set; }
Gets or sets a value that determines whether the user can navigate to an item by typing when RadPropertyGrid is focused.
[Browsable(true)]
public bool KeyboardSearchEnabled { get; set; }
The default value is false.
Gets or sets a value that specifies how long the user must wait before searching with the keyboard is reset.
[Browsable(true)]
public int KeyboardSearchResetInterval { get; set; }
The default value is 300.
Gets the PropertyGridTableElement of this control.
[Browsable(false)]
public PropertyGridElement PropertyGridElement { get; }
Gets or sets the mode in which the properties will be displayed in the RadPropertyGrid.
[Browsable(true)]
public PropertySort PropertySort { get; set; }
Gets or sets the shortcut menu associated with the control.
public virtual RadContextMenu RadContextMenu { get; set; }
Gets or sets a value indicating whether the property grid is in read-only mode, preventing users from editing property values.
[Browsable(true)]
public bool ReadOnly { get; set; }
true if the property grid is read-only; otherwise, false. The default value is false.
Gets or sets the PropertyGridTableElement selected item.
[Browsable(false)]
public PropertyGridItemBase SelectedGridItem { get; set; }
Gets or sets the object which properties the RadPropertyGrid is displaying.
[TypeConverter(typeof(SelectedObjectConverter))]
[Browsable(true)]
public object SelectedObject { get; set; }
Gets or sets the objects which properties the RadPropertyGrid is displaying.
[TypeConverter(typeof(SelectedObjectConverter))]
[Browsable(false)]
public object[] SelectedObjects { get; set; }
Gets the sort descriptors.
[Browsable(false)]
public SortDescriptorCollection SortDescriptors { get; }
Gets or sets the sort order of items.
[Browsable(true)]
public SortOrder SortOrder { get; set; }
Gets or sets a value indicating whether the search box of the RadPropertyGrid should be visible
[Browsable(true)]
public bool ToolbarVisible { get; set; }
Methods
Puts the current item in edit mode.
public void BeginEdit()
Uses a mechanism to maximize the visible strings in both columns of RadPropertyGrid.
public void BestFit()
Best fits the column(s) of RadPropertyGrid using the given mode.
public void BestFit(PropertyGridBestFitMode mode)
The mode that determines the mechanism used for best fitting.
Close the currently active editor and discard changes.
public void CancelEdit()
Collapses all the categories in the RadPropertyGrid.
public void CollapseAllGridItems()
protected override AccessibleObject CreateAccessibilityInstance()
Overrides:
Creates the child elements for the property grid control.
protected override void CreateChildItems(RadElement parent)
The parent element that will contain the child elements.
Overrides:
Creates the main PropertyGridElement that provides the core functionality for the property grid.
protected virtual PropertyGridElement CreatePropertyGridElement()
A new instance of PropertyGridElement.
Commits any changes and ends the edit operation on the current item.
Expands all the categories in the RadPropertyGrid.
public void ExpandAllGridItems()
Notifies that the control is about to be visualized.
protected override void OnMouseDoubleClick(MouseEventArgs e)
Overrides:
Resets the selected property to its default value.
public void ResetSelectedProperty()
Events
Occurs when opening the context menu.
public event PropertyGridContextMenuOpeningEventHandler ContextMenuOpening
Occurs when a new item element is going to be created.
public event CreatePropertyGridItemEventHandler CreateItem
Occurs when a new item element is going to be created.
public event CreatePropertyGridItemElementEventHandler CreateItemElement
Fires for custom grouping operation.
[Browsable(true)]
public event PropertyGridCustomGroupingEventHandler CustomGrouping
Occurs when editing has been finished.
public event PropertyGridItemEditedEventHandler Edited
Occurs when editing is started.
public event PropertyGridItemEditingEventHandler Editing
Occurs when editor is initialized.
public event PropertyGridItemEditorInitializedEventHandler EditorInitialized
Occurs when editor is required.
public event PropertyGridEditorRequiredEventHandler EditorRequired
Occurs after the value of the Expanded property of a property grid item is changed.
public event RadPropertyGridEventHandler ItemExpandedChanged
Occurs before the value of the Expanded property of a property grid item is changed.
public event RadPropertyGridCancelEventHandler ItemExpandedChanging
Occurs when the item changes its state and needs to be formatted.
public event PropertyGridItemFormattingEventHandler ItemFormatting
Occurs when a mouse button is clicked inside a PropertyGridItemElementBase
public event RadPropertyGridEventHandler ItemMouseClick
Occurs when a mouse button is double clicked inside a PropertyGridItemElementBase
public event RadPropertyGridEventHandler ItemMouseDoubleClick
Occurs when the user presses a mouse button over a property grid item.
public event PropertyGridMouseEventHandler ItemMouseDown
Occurs when the user moves the mouse in the area of a property grid item.
public event PropertyGridMouseEventHandler ItemMouseMove
Fires when a property has finished validating.
public event PropertyValidatedEventHandler PropertyValidated
Fires when a property value is validating.
public event PropertyValidatingEventHandler PropertyValidating
Occurs when a property value changes.
public event PropertyGridItemValueChangedEventHandler PropertyValueChanged
Occurs when item's value is changing.
public event PropertyGridItemValueChangingEventHandler PropertyValueChanging
Occurs after the property item is selected.
public event RadPropertyGridEventHandler SelectedGridItemChanged
Occurs before a property grid item is selected.
public event RadPropertyGridCancelEventHandler SelectedGridItemChanging
Occurs after the selected object is changed.
public event PropertyGridSelectedObjectChangedEventHandler SelectedObjectChanged
Occurs before the selected object is changed.
public event PropertyGridSelectedObjectChangingEventHandler SelectedObjectChanging
Fires when the value of an editor changes.
[Browsable(true)]
public event EventHandler ValueChanged
Fires before the value in an editor is being changed. The action can be canceled.
[Browsable(true)]
public event ValueChangingEventHandler ValueChanging