ClassPropertyGridTableElement
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PropertyGridTableElement : VirtualizedScrollPanel<PropertyGridItemBase, PropertyGridItemElementBase>, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IDataItemSource
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<VirtualizedStackContainer<PropertyGridItemBase>>VirtualizedScrollPanel<PropertyGridItemBase, PropertyGridItemElementBase>PropertyGridTableElement
Implements:
Inherited Members
Constructors
PropertyGridTableElement()
Declaration
public PropertyGridTableElement()
Fields
CreateItem
Declaration
public CreatePropertyGridItemEventHandler CreateItem
Field Value
CreateItemElement
Declaration
public CreatePropertyGridItemElementEventHandler CreateItemElement
Field Value
Properties
ActiveEditor
Gets the active editor.
AutoExpandGroups
Gets or sets a value indicating whether the groups will be expanded or collapse upon creation.
Declaration
[Browsable(true)]
public bool AutoExpandGroups { get; set; }
Property Value
BeginEditMode
Gets or sets a value indicating how user begins editing a cell.
Declaration
[Browsable(true)]
public RadPropertyGridBeginEditModes BeginEditMode { get; set; }
Property Value
CollectionView
Gets the collection to which the RadPropertyGrid is bound to.
Declaration
[Browsable(false)]
public RadCollectionView<PropertyGridItem> CollectionView { get; }
Property Value
ContextMenu
Gets or sets the context menu.
Declaration
public virtual RadContextMenu ContextMenu { get; set; }
Property Value
The context menu.
EnableCustomGrouping
Gets or sets a value indicating whether the data can be grouped programmatically.
Declaration
[Browsable(true)]
public bool EnableCustomGrouping { get; set; }
Property Value
EnableKineticScrolling
Gets or sets a value indicating whether the kinetic scrolling function is enabled.
Declaration
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }
Property Value
FilterDescriptors
Gets the filter descriptors.
Declaration
[Browsable(false)]
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
The filter descriptors.
FindStringComparer
Gets or sets an object that implements IFindStringComparer. The value of this property is used in the keyboard search functionality.
Declaration
public IFindStringComparer FindStringComparer { get; set; }
Property Value
GroupDescriptors
Gets the group descriptors.
Declaration
[Browsable(false)]
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
The group descriptors.
Groups
Declaration
public virtual PropertyGridGroupItemCollection Groups { get; }
Property Value
IsEditing
Gets a value indicating whether there are currently open editors.
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 property grid items.
Declaration
[Browsable(true)]
public override int ItemSpacing { get; set; }
Property Value
Overrides
KeyboardSearchEnabled
Gets or sets a value that determines whether the user can navigate to an item by typing when RadPropertyGrid is focused. 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. The default value is 300.
Declaration
public int KeyboardSearchResetInterval { get; set; }
Property Value
ListSource
Declaration
public RadListSource<PropertyGridItem> ListSource { get; }
Property Value
MinimumColumnWidth
Gets or sets the minimum width columns can have.
Declaration
[Browsable(true)]
public int MinimumColumnWidth { get; set; }
Property Value
OverrideBuiltInEditors
Gets or sets a value that indicates whether editors specified with an EditorAttribute will be used without considering built-in editors.
Declaration
[Browsable(true)]
public bool OverrideBuiltInEditors { get; set; }
Property Value
PropertyGridElement
Gets the PropertyGridElement that is a parent to this element.
Declaration
public PropertyGridElement PropertyGridElement { get; }
Property Value
PropertyItems
Declaration
public virtual PropertyGridRootItemsCollection PropertyItems { get; }
Property Value
PropertySort
Gets or sets the mode in which the properties will be displayed in the PropertyGridTableElement.
Declaration
[Browsable(true)]
public PropertySort PropertySort { get; set; }
Property Value
ReadOnly
Gets or sets a value indicating whether the user is allowed to edit the values of the properties.
Declaration
[Browsable(true)]
public bool ReadOnly { get; set; }
Property Value
ScrollBehavior
Gets the ScrollServiceBehavior that is responsible for the kinetic scrolling option.
Declaration
public ScrollServiceBehavior ScrollBehavior { get; }
Property Value
SelectedGridItem
Gets the PropertyGridTableElement selected item.
Declaration
public PropertyGridItemBase SelectedGridItem { get; set; }
Property Value
SelectedObject
Gets or sets the object which properties the RadPropertyGrid is displaying.
Declaration
[Browsable(false)]
public object SelectedObject { get; set; }
Property Value
SelectedObjects
Gets or sets the objects which properties the RadPropertyGrid is displaying.
Declaration
[Browsable(false)]
public object[] SelectedObjects { get; set; }
Property Value
object[]
SortDescriptors
Gets the sort descriptors.
Declaration
[Browsable(false)]
public SortDescriptorCollection SortDescriptors { get; }
Property Value
The sort descriptors.
SortOrder
Gets or sets the sort order of Nodes.
Declaration
[Browsable(false)]
public SortOrder SortOrder { get; set; }
Property Value
The sort order.
UseCachedValues
Gets or sets a value indicating whether the values of the items should be invalidated the next time a grouping and/or sorting is performed.
Declaration
[Browsable(false)]
public virtual bool UseCachedValues { get; set; }
Property Value
ValueColumnWidth
Gets or sets the width of the "column" that holds the values.
Declaration
[Browsable(true)]
public int ValueColumnWidth { get; set; }
Property Value
Methods
BeginEdit()
Puts the current item in edit mode.
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.
BindingComplete()
Declaration
public void BindingComplete()
Implements
CancelEdit()
Close the currently active editor and discard changes.
Declaration
public void CancelEdit()
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateElementProvider()
This method creates an object that implements IVirtualizedElementProvider. Child elements are not yet created in this method.
Declaration
protected override IVirtualizedElementProvider<PropertyGridItemBase> CreateElementProvider()
Returns
IVirtualizedElementProvider<PropertyGridItemBase>
A new instance of an implementation of IVirtualizedElementProvider.
Overrides
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
EndEdit()
Commits any changes and ends the edit operation on the current item.
EndEditCore(bool)
Ends the editing of an item and commits or discards the changes.
EndUpdate(bool, UpdateActions)
Ends the update.
Declaration
public void EndUpdate(bool performUpdate, PropertyGridTableElement.UpdateActions action)
Parameters
performUpdate
Tells the view whether an update is required or not.
action
PropertyGridTableElement.UpdateActions
Indicates the update action
EnsureVisible(PropertyGridItemBase)
Ensures the item is visible within the RadPropertygridElement and scrolls the element if needed.
Declaration
public void EnsureVisible(PropertyGridItemBase item)
Parameters
item
The item to visualize.
EnsureVisibleCore(PropertyGridItemBase)
Ensures the item is visible within the RadPropertygridElement and scrolls the element if needed.
Declaration
protected virtual void EnsureVisibleCore(PropertyGridItemBase item)
Parameters
item
The item to visualize.
GetEditor(Type)
Gets an editor depending on the type of the value to be edited.
Declaration
protected virtual IInputEditor GetEditor(Type editorType)
Parameters
editorType
The type of the value.
Returns
GetEditorTypeForItem(PropertyGridItem)
Gets the type of editor used for a editing the given item.
Declaration
protected virtual Type GetEditorTypeForItem(PropertyGridItem item)
Parameters
item
The item to get editor type for.
Returns
The type of the editor
GetElementAt(int, int)
Gets the element at specified coordinates.
Declaration
public PropertyGridItemElementBase GetElementAt(int x, int y)
Parameters
x
The x coordinate.
y
The y coordinate.
Returns
An instance of PropertyGridItemBase if successful.
GetElementContextMenu(PropertyGridItemElementBase)
Initializes and returns the context menu associated with the specified PropertyGridItemElementBase.
Declaration
public RadContextMenu GetElementContextMenu(PropertyGridItemElementBase element)
Parameters
element
The element.
Returns
An instance of RadContextMenu if successfull.
GetFirstMatch(string, IList<PropertyGridItem>)
This method traverses through the visible items of RadPropetyGrid and returns an item matching the searchCriteria.
Declaration
protected virtual PropertyGridItemBase GetFirstMatch(string searchCriteria, IList<PropertyGridItem> items)
Parameters
searchCriteria
items
IList<PropertyGridItem>
Returns
GetImageFormat(Image)
Declaration
public ImageFormat GetImageFormat(Image image)
Parameters
image
Returns
GetSelectedObjectDefaultProperty()
Gets the default property for the selected object
Declaration
protected virtual PropertyGridItem GetSelectedObjectDefaultProperty()
Returns
The PropertyGridItem that is the default property.
Initialize()
Declaration
public void Initialize()
Implements
InitializeFields()
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
Declaration
protected override void InitializeFields()
Overrides
IsItemEditable(PropertyGridItem)
Returns a value indicating whether the PropertyGridItem is editable
Declaration
protected virtual bool IsItemEditable(PropertyGridItem item)
Parameters
item
The item to check.
Returns
True if item can be edited. Otherwise false.
MeasureOverride(SizeF)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
NewItem(PropertyGridItem)
Declaration
public IDataItem NewItem(PropertyGridItem parentItem)
Parameters
parentItem
Returns
OnAutoSizeChanged()
Called when auto size is changed.
Declaration
protected override void OnAutoSizeChanged()
Overrides
OnContextMenuOpening(PropertyGridContextMenuOpeningEventArgs)
Declaration
protected virtual void OnContextMenuOpening(PropertyGridContextMenuOpeningEventArgs e)
Parameters
e
OnCreateItem(CreatePropertyGridItemEventArgs)
Declaration
protected virtual void OnCreateItem(CreatePropertyGridItemEventArgs e)
Parameters
e
OnCreateItemElement(CreatePropertyGridItemElementEventArgs)
Declaration
protected virtual void OnCreateItemElement(CreatePropertyGridItemElementEventArgs e)
Parameters
e
OnCustomGrouping(PropertyGridCustomGroupingEventArgs)
Declaration
protected virtual void OnCustomGrouping(PropertyGridCustomGroupingEventArgs e)
Parameters
e
OnEdited(PropertyGridItemEditedEventArgs)
Declaration
protected virtual void OnEdited(PropertyGridItemEditedEventArgs e)
Parameters
e
OnEditing(PropertyGridItemEditingEventArgs)
Declaration
protected virtual void OnEditing(PropertyGridItemEditingEventArgs e)
Parameters
e
OnEditorInitialized(PropertyGridItemEditorInitializedEventArgs)
Declaration
protected virtual void OnEditorInitialized(PropertyGridItemEditorInitializedEventArgs e)
Parameters
e
OnEditorRequired(PropertyGridEditorRequiredEventArgs)
Declaration
protected virtual void OnEditorRequired(PropertyGridEditorRequiredEventArgs e)
Parameters
e
OnItemExpandedChanged(RadPropertyGridEventArgs)
Declaration
protected virtual void OnItemExpandedChanged(RadPropertyGridEventArgs e)
Parameters
e
OnItemExpandedChanging(RadPropertyGridCancelEventArgs)
Declaration
protected virtual void OnItemExpandedChanging(RadPropertyGridCancelEventArgs e)
Parameters
e
OnItemFormatting(PropertyGridItemFormattingEventArgs)
Declaration
protected virtual void OnItemFormatting(PropertyGridItemFormattingEventArgs e)
Parameters
e
OnItemMouseClick(RadPropertyGridEventArgs)
Declaration
protected virtual void OnItemMouseClick(RadPropertyGridEventArgs e)
Parameters
e
OnItemMouseDoubleClick(RadPropertyGridEventArgs)
Declaration
protected virtual void OnItemMouseDoubleClick(RadPropertyGridEventArgs e)
Parameters
e
OnItemMouseDown(PropertyGridMouseEventArgs)
Declaration
protected virtual void OnItemMouseDown(PropertyGridMouseEventArgs e)
Parameters
e
OnItemMouseMove(PropertyGridMouseEventArgs)
Declaration
protected virtual void OnItemMouseMove(PropertyGridMouseEventArgs e)
Parameters
e
OnLoaded()
Called when the element has been successfully loaded. That includes loading of all its children as well.
Declaration
protected override void OnLoaded()
Overrides
OnPanGesture(PanGestureEventArgs)
Fires the PanGesture event.
Declaration
protected override void OnPanGesture(PanGestureEventArgs args)
Parameters
args
The arguments for the PanGesture event.
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
Event arguments containing information about the property that changed.
Overrides
OnPropertyValidated(PropertyValidatedEventArgs)
Declaration
protected virtual void OnPropertyValidated(PropertyValidatedEventArgs e)
Parameters
e
OnPropertyValidating(PropertyValidatingEventArgs)
Declaration
protected virtual void OnPropertyValidating(PropertyValidatingEventArgs e)
Parameters
e
OnPropertyValueChanged(PropertyGridItemValueChangedEventArgs)
Declaration
protected virtual void OnPropertyValueChanged(PropertyGridItemValueChangedEventArgs e)
Parameters
e
OnPropertyValueChanging(PropertyGridItemValueChangingEventArgs)
Declaration
protected virtual void OnPropertyValueChanging(PropertyGridItemValueChangingEventArgs e)
Parameters
e
OnSelectedGridItemChanged(RadPropertyGridEventArgs)
Declaration
protected virtual void OnSelectedGridItemChanged(RadPropertyGridEventArgs args)
Parameters
args
OnSelectedGridItemChanging(RadPropertyGridCancelEventArgs)
Declaration
protected virtual void OnSelectedGridItemChanging(RadPropertyGridCancelEventArgs args)
Parameters
args
OnSelectedObjectChanged(PropertyGridSelectedObjectChangedEventArgs)
Declaration
protected virtual void OnSelectedObjectChanged(PropertyGridSelectedObjectChangedEventArgs e)
Parameters
e
OnSelectedObjectChanging(PropertyGridSelectedObjectChangingEventArgs)
Declaration
protected virtual void OnSelectedObjectChanging(PropertyGridSelectedObjectChangingEventArgs e)
Parameters
e
OnValueChanging(object, ValueChangingEventArgs)
Declaration
protected virtual void OnValueChanging(object sender, ValueChangingEventArgs e)
Parameters
sender
e
PerformPropertySort(PropertySort)
Performs the needed operations on the data layer when the PropertySort mode is changed.
Declaration
protected virtual void PerformPropertySort(PropertySort propertySort)
Parameters
propertySort
ProcessKeyDown(KeyEventArgs)
Declaration
public virtual bool ProcessKeyDown(KeyEventArgs e)
Parameters
e
Returns
ProcessKeyPress(KeyPressEventArgs)
Declaration
protected virtual bool ProcessKeyPress(KeyPressEventArgs e)
Parameters
e
Returns
ProcessMouseClick(MouseEventArgs)
Declaration
public virtual bool ProcessMouseClick(MouseEventArgs e)
Parameters
e
Returns
ProcessMouseDoubleClick(MouseEventArgs)
Declaration
public virtual bool ProcessMouseDoubleClick(MouseEventArgs e)
Parameters
e
Returns
ProcessMouseDown(MouseEventArgs)
Declaration
public virtual bool ProcessMouseDown(MouseEventArgs e)
Parameters
e
Returns
ProcessMouseMove(MouseEventArgs)
Declaration
public virtual bool ProcessMouseMove(MouseEventArgs e)
Parameters
e
Returns
ProcessMouseUp(MouseEventArgs)
Declaration
public virtual bool ProcessMouseUp(MouseEventArgs e)
Parameters
e
Returns
ProcessMouseWheel(MouseEventArgs)
Declaration
public virtual bool ProcessMouseWheel(MouseEventArgs e)
Parameters
e
Returns
ProcessSelection(PropertyGridItemBase, bool)
Declaration
protected virtual bool ProcessSelection(PropertyGridItemBase item, bool isMouseSelection)
Parameters
item
isMouseSelection
Returns
RaiseValueChanged(EventArgs)
Allows you to raise ValueChanged event when using custom editor.
RaiseValueChanging(ValueChangingEventArgs)
Allows you to raise ValueChanging event when using custom editor.
Declaration
public void RaiseValueChanging(ValueChangingEventArgs e)
Parameters
e
ResetColumnWidths()
Makes the property grid columns even.
Declaration
public void ResetColumnWidths()
ScrollToItem(PropertyGridItemBase)
Scrolls the scrollbar to bring the specified PropertyGridItemBase into view.
Declaration
public void ScrollToItem(PropertyGridItemBase item)
Parameters
item
The item to visualize.
SortSubItems()
Sorts the sub items of all expanded items.
Declaration
public virtual void SortSubItems()
SynchronizeVisualItems()
Syncronizes all visual elements.
Declaration
protected virtual void SynchronizeVisualItems()
UnwireEvents()
Performs events unsubscription from internal objects. The base implementation must always be called.
Declaration
protected override void UnwireEvents()
Overrides
Update(UpdateActions)
Updates the visual items in the property grid
Declaration
public void Update(PropertyGridTableElement.UpdateActions updateAction)
Parameters
updateAction
PropertyGridTableElement.UpdateActions
Indicated the update action
UpdateScrollers(UpdateActions)
Updates the scroll bars visibility.
Specifies the action which caused the update.Declaration
protected virtual void UpdateScrollers(PropertyGridTableElement.UpdateActions updateAction)
Parameters
updateAction
WireEvents()
Performs events subscription to internal objects. The base implementation must always be called.
Declaration
protected override void WireEvents()
Overrides
Events
BindingContextChanged
Occurs when [binding context changed].
Declaration
public event EventHandler BindingContextChanged
Event Value
Implements
ContextMenuOpening
Declaration
public event PropertyGridContextMenuOpeningEventHandler ContextMenuOpening
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 when item has been expanded.
Declaration
public event RadPropertyGridEventHandler ItemExpandedChanged
Event Value
ItemExpandedChanging
Occurs when item is expanding.
Declaration
public event RadPropertyGridCancelEventHandler ItemExpandedChanging
Event Value
ItemFormatting
Occurs when PropertyGridItemElement is formatting
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 a mouse button is pressed on the PropertyGridItemElement.
Declaration
public event PropertyGridMouseEventHandler ItemMouseDown
Event Value
ItemMouseMove
Occurs when mouse moves over a PropertyGridItemElement.
Declaration
public event PropertyGridMouseEventHandler ItemMouseMove
Event Value
PropertyValidated
Fires when a peoperty 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 item's value has been changed.
Declaration
public event PropertyGridItemValueChangedEventHandler PropertyValueChanged
Event Value
PropertyValueChanging
Occurs when item's value is changing.
Declaration
public event PropertyGridItemValueChangingEventHandler PropertyValueChanging
Event Value
SelectedGridItemChanged
Occurs when selected item has been changed.
Declaration
public event RadPropertyGridEventHandler SelectedGridItemChanged
Event Value
SelectedGridItemChanging
Occurs when the selected item is changing
Declaration
public event RadPropertyGridCancelEventHandler SelectedGridItemChanging
Event Value
SelectedObjectChanged
Occurs after the property grid selected object has been 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.
ValueChanging
Fires before the value in an editor is being changed. The action can be canceled.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Value