Class
PropertyGroupDescriptionBase

Provides a base class for grouping items in pivot operations based on object property values. This class enables property-based grouping, sorting, and filtering for LocalDataSourceProvider with support for well-known groups, calculated items, and culture-aware operations.

Definition

Namespace:Telerik.Pivot.Core

Assembly:Telerik.WinControls.PivotGrid.dll

Syntax:

cs-api-definition
[DataContract]
public abstract class PropertyGroupDescriptionBase : GroupDescription, INotifyPropertyChanged, ISupportInitialize, IServiceProvider, IGroupDescription, IDescriptionBase, INamed, IEditable, ILabelGroupFilterHost, IValueGroupFilterHost, IFilteringDescription, IDistinctValuesDescription, IConditionFactory, IFilterOperatorsProvider

Inheritance: objectCloneableSettingsNodeDescriptionBaseGroupDescriptionBaseGroupDescriptionPropertyGroupDescriptionBase

Derived Classes: DateTimeGroupDescriptionDoubleGroupDescriptionPropertyGroupDescription

Implements: IConditionFactoryIDescriptionBaseIDistinctValuesDescriptionIEditableIFilterOperatorsProviderIFilteringDescriptionIGroupDescriptionILabelGroupFilterHostINamedINotifyPropertyChangedIServiceProviderISupportInitializeIValueGroupFilterHost

Inherited Members GroupDescription.ShowGroupsWithNoDataGroupDescription.AutoShowSubTotalsGroupDescription.GroupFilterGroupDescriptionBase.GroupComparerGroupDescriptionBase.SortOrderDescriptionBase.DisplayNameDescriptionBase.CustomNameSettingsNode.NotifyServicesChanged()SettingsNode.NotifySettingsChanged(SettingsChangedEventArgs)SettingsNode.OnSettingsChanged(SettingsChangedEventArgs)SettingsNode.BeginEdit()SettingsNode.BeginInit()SettingsNode.EndInit()SettingsNode.GetService(Type)SettingsNode.OnPropertyChanged(string)SettingsNode.RemoveSettingsChild(SettingsNode)SettingsNode.AddSettingsChild(SettingsNode)SettingsNode.GetServiceOverride(Type)SettingsNode.OnEnteredEditScope()SettingsNode.OnExitingEditScope()SettingsNode.ParentSettingsNode.SettingsChangedSettingsNode.ServicesChangedSettingsNode.PropertyChangedCloneable.Clone()Cloneable.CreateInstanceCore()

Constructors

PropertyGroupDescriptionBase()

Declaration

cs-api-definition
protected PropertyGroupDescriptionBase()

Properties

CalculatedItems

Gets the collection of calculated items used to create custom groups with predefined subgroups and summarized values. Calculated items allow defining virtual groups that don't exist in the source data but provide additional grouping logic.

Declaration

cs-api-definition
[DataMember]
public Collection<CalculatedItem> CalculatedItems { get; }

Property Value

Collection<CalculatedItem>

Culture

Gets the CultureInfo used for culture-aware grouping operations. This culture is inherited from the LocalDataSourceProvider and affects sorting, formatting, and comparison operations during grouping.

Declaration

cs-api-definition
protected CultureInfo Culture { get; }

Property Value

CultureInfo

PropertyName

Gets or sets the name of the property used for grouping items. This property identifies which field from the data objects should be used to create group keys and organize data.

Declaration

cs-api-definition
[DataMember]
public string PropertyName { get; set; }

Property Value

string

Methods

CloneCore(Cloneable)

Creates a deep copy of this instance by copying core properties and delegating type-specific cloning to derived classes. This method handles the base property copying and calls CloneOverride(Cloneable) for derived class implementation.

Declaration

cs-api-definition
protected override sealed void CloneCore(Cloneable source)

Parameters

source

Cloneable

The source object to clone from.

Overrides GroupDescription.CloneCore(Cloneable)

Remarks

Notes to Inheritors If you derive from Cloneable, you may need to override this method to copy all properties. It is essential that all implementations call the base implementation of this method (if you don't call base you should manually copy all needed properties including base properties).

CloneOverride(Cloneable)

When overridden in derived classes, performs type-specific cloning operations for the derived class properties. This method is called by CloneCore(Cloneable) after base properties have been copied.

Declaration

cs-api-definition
protected abstract void CloneOverride(Cloneable source)

Parameters

source

Cloneable

The source object to clone from.

Remarks

Notes to Inheritors: If you derive from Cloneable, you need to override this method to copy all properties. It is essential that all implementations call the base implementation of this method (if you don't call base you should manually copy all needed properties including base properties).

GetAllNames(IEnumerable<object>, IEnumerable<object>)

Gets all possible group names by combining unique names from the data with calculated items. This method merges the actual data group names with any defined calculated items to provide a complete list of available groups.

Declaration

cs-api-definition
protected override IEnumerable<object> GetAllNames(IEnumerable<object> uniqueNames, IEnumerable<object> parentGroupNames)

Parameters

uniqueNames

IEnumerable<object>

The unique group names found in the actual data.

parentGroupNames

IEnumerable<object>

The parent group names in the hierarchy.

Returns

IEnumerable<object>

A combined enumerable of unique names and calculated items.

Overrides GroupDescription.GetAllNames(IEnumerable<object>, IEnumerable<object>)

GetDisplayName()

Gets the display name for this group description by trying multiple sources in priority order. Returns the base display name if set, otherwise the field info display name if available, and finally falls back to the property name.

Declaration

cs-api-definition
protected override string GetDisplayName()

Returns

string

The display name for this group description.

Overrides DescriptionBase.GetDisplayName()

GetUniqueName()

Gets the unique name for this group description, which is the property name used for grouping. This unique name is used to identify and distinguish this group description from others.

Declaration

cs-api-definition
public override string GetUniqueName()

Returns

string

The property name that serves as the unique identifier for this group description.

Overrides DescriptionBase.GetUniqueName()

GroupNameFromItem(object, int)

Returns the group name that would contain the specified item based on the configured property value. This method extracts the property value from the item and processes it to create an appropriate group key.

Declaration

cs-api-definition
protected virtual object GroupNameFromItem(object item, int level)

Parameters

item

object

The data item to determine the group for.

level

int

The level of grouping for this group description in the hierarchy.

Returns

object

The group name object that would contain the specified item.

Exceptions

InvalidOperationException

Thrown when the field information has not been initialized or the item doesn't have the specified property.