New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class PropertyGridItem : PropertyGridItemBase, INotifyPropertyChanged, IDataItem, ITypeDescriptorContext, IServiceProvider

Inheritance: objectPropertyGridItemBasePropertyGridItem

Implements: IDataItemINotifyPropertyChangedIServiceProviderITypeDescriptorContext

Inherited Members PropertyGridItemBase.SuspendNotificationsStatePropertyGridItemBase.IsExpandedStatePropertyGridItemBase.IsVisibleStatePropertyGridItemBase.IsEnableStatePropertyGridItemBase.IsModifiedStatePropertyGridItemBase.statePropertyGridItemBase.textPropertyGridItemBase.Expand()PropertyGridItemBase.Collapse()PropertyGridItemBase.EnsureVisible()PropertyGridItemBase.Select()PropertyGridItemBase.SetBooleanProperty(string, int, bool)PropertyGridItemBase.Update(PropertyGridTableElement.UpdateActions)PropertyGridItemBase.SuspendPropertyNotifications()PropertyGridItemBase.ResumePropertyNotifications()PropertyGridItemBase.OnNotifyPropertyChanged(string)PropertyGridItemBase.OnNotifyPropertyChanged(PropertyChangedEventArgs)PropertyGridItemBase.PropertyGridTableElementPropertyGridItemBase.VisiblePropertyGridItemBase.SelectedPropertyGridItemBase.ExpandedPropertyGridItemBase.EnabledPropertyGridItemBase.ItemHeightPropertyGridItemBase.ImagePropertyGridItemBase.ImageIndexPropertyGridItemBase.ImageKeyPropertyGridItemBase.ToolTipTextPropertyGridItemBase.ContextMenuPropertyGridItemBase.TagPropertyGridItemBase.LevelPropertyGridItemBase.PropertyChanged...

Constructors

C#
public PropertyGridItem(PropertyGridTableElement propertyGridElement, PropertyGridItem parentItem)
Parameters:propertyGridElementPropertyGridTableElementparentItemPropertyGridItem
C#
public PropertyGridItem(PropertyGridTableElement propertyGridElement)
Parameters:propertyGridElementPropertyGridTableElement

Fields

C#
protected object cachedValue

Properties

Gets the item accessor for this property item.

C#
public IItemAccessor Accessor { get; }

Gets a collection of the attributes applied to the property.

C#
public virtual AttributeCollection Attributes { get; }

Gets the category of the property from its CategoryAttribute or returns "Other" if no category is specified.

C#
public virtual string Category { get; }
C#
public IContainer Container { get; }

Implements: ITypeDescriptorContext.Container

C#
public object DataBoundItem { get; set; }

Implements: IDataItem.DataBoundItem

C#
public bool DefaultSortOrder { get; set; }

Gets or sets the description associated with this item.

C#
public override string Description { get; set; }

Overrides: PropertyGridItemBase.Description

Gets or sets an error message to be displayed when property value validation fails.

C#
public virtual string ErrorMessage { get; set; }

Gets a value indicating whether this is a complex property.

C#
public override bool Expandable { get; }

Overrides: PropertyGridItemBase.Expandable

C#
public int FieldCount { get; }

Implements: IDataItem.FieldCount

Gets the value of the property as a string using its TypeConverter.

C#
public virtual string FormattedValue { get; set; }

Gets the sub items of the current if it is composed of several sub-items.

C#
public override PropertyGridItemCollection GridItems { get; }

Overrides: PropertyGridItemBase.GridItems

C#
public object Instance { get; }

Implements: ITypeDescriptorContext.Instance

Gets a value indicating whether the property value is modified.

C#
public virtual bool IsModified { get; }

Gets or sets a value defining whether check box editor will be three state.

C#
public virtual bool IsThreeState { get; set; }

Gets or sets the text that would be displayed for this property.

C#
public override string Label { get; set; }

Overrides: PropertyGridItemBase.Label

Gets the property name

C#
public override string Name { get; }

Overrides: PropertyGridItemBase.Name

Gets the original property value.

C#
public virtual object OriginalValue { get; }

Gets or sets the parent of this item.

C#
public override PropertyGridItemBase Parent { get; }

Overrides: PropertyGridItemBase.Parent

Gets the property descriptor for this property.

C#
public virtual PropertyDescriptor PropertyDescriptor { get; }

Implements: ITypeDescriptorContext.PropertyDescriptor

Gets the property type

C#
public virtual Type PropertyType { get; }

Gets a value indicating whether the property is read only.

C#
public virtual bool ReadOnly { get; }

Gets or sets a value defining the sort order of the item when no other sorting is applied.

C#
public virtual int SortOrder { get; set; }
C#
public object this[int index] { get; set; }
Parameters:indexint

Implements: IDataItem.this[int]

C#
public object this[string name] { get; set; }
Parameters:namestring

Implements: IDataItem.this[string]

Gets the TypeConverter associated with this property

C#
public virtual TypeConverter TypeConverter { get; }

Gets the UITypeEditor associated with this property

C#
public virtual UITypeEditor UITypeEditor { get; }

Gets or sets the item value.

C#
public virtual object Value { get; set; }
Property Value:

The text.

Methods

Selects this item and puts the Property grid in edit mode.

C#
public virtual void BeginEdit()

Converts a string into a password string.

C#
protected virtual string ConvertToPasswordString(string input)
Parameters:inputstring

The input.

Returns:

string

Gets the child items for a given item.

C#
protected virtual PropertyGridItemCollection GetChildItems(PropertyGridItem parentItem, object obj, Type objType)
Parameters:parentItemPropertyGridItem

The parent item for which to get the child items.

objobject

The instance of the item.

objTypeType

The type of the property.

Returns:

PropertyGridItemCollection

Collection of PropertyGridItem

C#
public object GetService(Type serviceType)
Parameters:serviceTypeTypeReturns:

object

Implements: IServiceProvider.GetService(Type)

C#
public int IndexOf(string name)
Parameters:namestringReturns:

int

Implements: IDataItem.IndexOf(string)

C#
public void OnComponentChanged()

Implements: ITypeDescriptorContext.OnComponentChanged()

C#
public bool OnComponentChanging()
Returns:

bool

Implements: ITypeDescriptorContext.OnComponentChanging()

Resets the property value to its default value.

C#
public virtual void ResetValue()
C#
protected virtual void SetParent(PropertyGridItem parent)
Parameters:parentPropertyGridItem

Determines if the item should update its child items based on the types of the old value and the new one.

C#
protected virtual bool ShouldGetChildItemsAnew(object oldValue, object newValue)
Parameters:oldValueobject

The old value of this item.

newValueobject

The new value of this item.

Returns:

bool

True if child items should be updated otherwise false.

Gets the default value of the current item. A return parameter determines if the operation succeeded.

C#
protected virtual bool TryGetDefaultValue(out object value)
Parameters:valueobject

An object where the default value will be stored if there is such.

Returns:

bool

True if the item has a default value otherwise false.