In This Article

DataGridEnumColumn Class

Represents a data-bound column for use in a DataGrid that utilizes the EnumEditBox control.

public class DataGridEnumColumn : DataGridPartEditBoxColumnBase<object>
Inheritance:
object DataGridColumn DataGridBoundColumn DataGridBoundColumnBase DataGridPartEditBoxColumnBase<object> object

Constructors

DataGridEnumColumn()

Initializes an instance of the DataGridEnumColumn class.

public DataGridEnumColumn()

Properties

EnumSortComparer

Gets or sets the IComparer<T> used to sort the enumeration values.

public IComparer<Enum> EnumSortComparer { get; set; }

Property Value

IComparer<Enum>:

The IComparer<T> used to sort the enumeration values; otherwise null to indicate no sorting, which will use the order the enumeration values are defined.

EnumType

Gets or sets the enumeration type.

public Type EnumType { get; set; }

Property Value

Type:

The enumeration type.

UseDisplayAttributes

Gets or sets a value indicating whether enumeration values should be displayed using an associated DisplayAttribute, if any.

public bool UseDisplayAttributes { get; set; }

Property Value

bool:

true if enumeration values should be displayed using an associated DisplayAttribute, if any; otherwise false. The default value is false.

Methods

ApplyStandardValues(FrameworkElement)

Applies standard values to the specified target element.

protected override void ApplyStandardValues(FrameworkElement targetElement)
Parameter Type Description
targetElement FrameworkElement

The target element.

GetEditBoxType()

Gets the type of the associated PartEditBoxBase-derived control.

protected override Type GetEditBoxType()

Returns

Type:

The type of the associated PartEditBoxBase-derived control.

Fields

EnumSortComparerProperty

Identifies the EnumSortComparer dependency property. This field is read-only.

public static readonly DependencyProperty EnumSortComparerProperty

EnumTypeProperty

Identifies the EnumType dependency property. This field is read-only.

public static readonly DependencyProperty EnumTypeProperty

UseDisplayAttributesProperty

Identifies the UseDisplayAttributes dependency property. This field is read-only.

public static readonly DependencyProperty UseDisplayAttributesProperty

Inherited Members