New to Telerik UI for WinForms? Start a free 30-day trial

Stores the ordered grouping levels applied by a collection view.

Each descriptor defines one level, and its group-name descriptors identify the fields and directions used at that level.

Definition

Namespace:Telerik.WinControls.Data

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class GroupDescriptorCollection : NotifyCollection<GroupDescriptor>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Inheritance: objectCollection<GroupDescriptor>NotifyCollection<GroupDescriptor>GroupDescriptorCollection

Derived Classes: GridViewGroupDescriptorCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyPropertyChanged

Inherited Members NotifyCollection<GroupDescriptor>.EmptyNotifyCollection<GroupDescriptor>.Move(int, int)NotifyCollection<GroupDescriptor>.AddRange(params GroupDescriptor[])NotifyCollection<GroupDescriptor>.AddRange(IEnumerable<GroupDescriptor>)NotifyCollection<GroupDescriptor>.BeginUpdate()NotifyCollection<GroupDescriptor>.EndUpdate()NotifyCollection<GroupDescriptor>.EndUpdate(bool)NotifyCollection<GroupDescriptor>.DeferRefresh()NotifyCollection<GroupDescriptor>.MoveItem(int, int)NotifyCollection<GroupDescriptor>.CreateEventArguments(NotifyCollectionChangedAction)NotifyCollection<GroupDescriptor>.CreateEventArguments(NotifyCollectionChangedAction, object, int)NotifyCollection<GroupDescriptor>.CreateEventArguments(NotifyCollectionChangedAction, object, object, int)NotifyCollection<GroupDescriptor>.OnCollectionChanged(NotifyCollectionChangedEventArgs)NotifyCollection<GroupDescriptor>.OnPropertyChanged(PropertyChangedEventArgs)NotifyCollection<GroupDescriptor>.OnPropertyChanged(string)NotifyCollection<GroupDescriptor>.VersionNotifyCollection<GroupDescriptor>.SuspendedNotifyCollection<GroupDescriptor>.CollectionChangedNotifyCollection<GroupDescriptor>.PropertyChangedCollection<GroupDescriptor>.Add(GroupDescriptor)Collection<GroupDescriptor>.Clear()Collection<GroupDescriptor>.CopyTo(GroupDescriptor[], int)Collection<GroupDescriptor>.Contains(GroupDescriptor)Collection<GroupDescriptor>.GetEnumerator()Collection<GroupDescriptor>.IndexOf(GroupDescriptor)Collection<GroupDescriptor>.Insert(int, GroupDescriptor)Collection<GroupDescriptor>.Remove(GroupDescriptor)Collection<GroupDescriptor>.RemoveAt(int)Collection<GroupDescriptor>.CountCollection<GroupDescriptor>.ItemsCollection<GroupDescriptor>.this[int]...

Constructors

C#
public GroupDescriptorCollection()

Properties

Gets or sets the expression.

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

The expression.

Gets or sets a value indicating whether fields with names that differ only in the casing should be considered different.

C#
public bool UseCaseSensitiveFieldNames { get; set; }

Methods

Adds the specified property name.

C#
public void Add(string propertyName, ListSortDirection direction)
Parameters:propertyNamestring

Name of the property.

directionListSortDirection

The direction.

Detaches ownership and property-change subscriptions from all descriptors before clearing the collection.

C#
protected override void ClearItems()

Overrides: NotifyCollection<GroupDescriptor>.ClearItems()

Determines whether [contains] [the specified property name].

C#
public bool Contains(string propertyName, bool caseSensitive)
Parameters:propertyNamestring

Name of the property.

caseSensitivebool
Returns:

bool

true if [contains] [the specified property name]; otherwise, false.

Determines whether [contains] [the specified property name].

C#
public bool Contains(string propertyName)
Parameters:propertyNamestring

Name of the property.

Returns:

bool

true if [contains] [the specified property name]; otherwise, false.

Finds all sort descriptors associated with the group descriptors by property name

C#
public ReadOnlyCollection<SortDescriptor> FindAllAssociatedSortDescriptors(string propertyName, bool caseSensitive)
Parameters:propertyNamestring

Name of the property.

caseSensitivebool

if set to true [case sensitive].

Returns:

ReadOnlyCollection<SortDescriptor>

All sort descriptors contained in the group descriptors by the specified propertyName

Finds all sort descriptors associated with the group descriptors by property name

C#
public ReadOnlyCollection<SortDescriptor> FindAllAssociatedSortDescriptors(string propertyName)
Parameters:propertyNamestring

Name of the property.

Returns:

ReadOnlyCollection<SortDescriptor>

All sort descriptors contained in the group descriptors by the specified propertyName

Creates the comparison options used to match group field names.

C#
protected CompareOptions GetCompareOpations(bool caseSensitive)
Parameters:caseSensitivebool

true to preserve case distinctions; otherwise, ignore case, kana type, and width.

Returns:

CompareOptions

The comparison flags for the requested name-matching behavior.

Inserts a descriptor, assigns its owner, and subscribes to its property-change notifications.

C#
protected override void InsertItem(int index, GroupDescriptor item)
Parameters:indexint

The position at which to insert the descriptor.

itemGroupDescriptor

The descriptor to insert.

Overrides: NotifyCollection<GroupDescriptor>.InsertItem(int, GroupDescriptor)

Removes the specified property name.

C#
public bool Remove(string propertyName)
Parameters:propertyNamestring

Name of the property.

Returns:

bool

Removes a descriptor and detaches its ownership and property-change subscription.

C#
protected override void RemoveItem(int index)
Parameters:indexint

The position of the descriptor to remove.

Overrides: NotifyCollection<GroupDescriptor>.RemoveItem(int)

Replaces a descriptor and updates ownership and property-change subscriptions for both instances.

C#
protected override void SetItem(int index, GroupDescriptor item)
Parameters:indexint

The position of the descriptor to replace.

itemGroupDescriptor

The replacement descriptor.

Overrides: NotifyCollection<GroupDescriptor>.SetItem(int, GroupDescriptor)