Compares PropertyGrid items using the table's primary sort property and overall sort direction.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PropertyGridItemComparer
Inheritance: objectPropertyGridItemComparer
Constructors
Associates the comparer with a table and initializes its cached sort property.
public PropertyGridItemComparer(PropertyGridTableElement propertyGridElement)
The table whose sort descriptors and sort direction are used.
Methods
Compares labels, default sort order, or the public property named by the cached sort descriptor. Comparable values are compared directly when their runtime types match; otherwise null and DBNull values are ordered, while other incompatible or non-comparable pairs compare equal. The result is reversed when the table's overall sort order is descending.
public int Compare(PropertyGridItem x, PropertyGridItem y)
The first item to compare.
yPropertyGridItemThe second item to compare.
Returns:A negative value, zero, or a positive value according to the selected sort key and direction.
Refreshes the cached property name from the first sort descriptor and prepares bound-property metadata.
public void Update()