WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TopLevelGroup

    Show / Hide Table of Contents

    Class TopLevelGroup

    TopLevelGroup is the first-level of the Groups present in ICollectionViewAdv. It maintains the data structure for Grouping with ICollectionViewAdv. Iterate the DisplayElements property to get one-to-one mapping of the index with the TopLevelGroup items. Access all the Bottom-level and other nested level groups with the Groups property.

    Inheritance
    System.Object
    NodeEntry
    GroupEntry
    Group
    TopLevelGroup
    DataGridTopLevelGroup
    Implements
    System.IDisposable
    System.Collections.Generic.IEnumerable<NodeEntry>
    System.Collections.IEnumerable
    IGroupRefresh
    IGroupList
    Inherited Members
    Group.TopLevelGroup
    Group.isDirty
    Group.isSourceYAmountDirty
    Group.OnGroupExpanded()
    Group.OnGroupCollapsed()
    Group.Populate(IEnumerable<GroupResult>)
    Group.Populate(IEnumerable<GroupResult>, List<Group>, Group, Int32)
    Group.CreateNewGroup(Group, GroupResult, Int32)
    Group.GetSummaryValue(String)
    Group.GetSummaryValue(String, String)
    Group.CreateNewGroup(Group, Object, Int32)
    Group.CreateDetailsForRecords(Group, Int32)
    Group.CreateDetailsForRecords(Group, IEnumerable, Int32)
    Group.CreateDetailsForGroups(Int32)
    Group.SetDirty()
    Group.GetYAmountCache()
    Group.GetSourceYAmountCache()
    Group.GetParentYAmountCache()
    Group.ResetYAmount()
    Group.ResetSourceYAmount()
    Group.RecalculateYAmount()
    Group.RecalculateSourceYAmount()
    Group.GetRecordAt(Int32)
    Group.GetRecordIndex(RecordEntry)
    Group.GetRecordIndex(Object)
    Group.AddRecord(RecordEntry, Boolean)
    Group.InsertRecord(Int32, RecordEntry, Boolean)
    Group.AddItem(Object)
    Group.RemoveRecord(RecordEntry, Boolean)
    Group.RemoveItem(Object)
    Group.GetRecordCount()
    Group.GetSourceCount()
    Group.GetRelationsCount()
    Group.GetGroupsCount()
    Group.GetEnumerator()
    Group.IEnumerable.GetEnumerator()
    Group.Parent
    Group.Key
    Group.ItemsCount
    Group.IsExpanded
    Group.IsBottomLevel
    Group.Details
    Group.Records
    Group.Source
    Group.Groups
    Group.SummaryDetails
    Group.PropertyChanged
    GroupEntry.ToSummaryArray()
    NodeEntry.Dispose()
    NodeEntry.Level
    NodeEntry.IsGroups
    NodeEntry.IsRecords
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Data
    Assembly: Syncfusion.Data.WinForms.dll
    Syntax
    public class TopLevelGroup : Group, IDisposable, IEnumerable<NodeEntry>, IEnumerable, IGroupRefresh, IGroupList

    Constructors

    TopLevelGroup(CollectionViewAdv)

    Initializes a new instance of the TopLevelGroup class.

    Declaration
    public TopLevelGroup(CollectionViewAdv collectionView)
    Parameters
    Type Name Description
    CollectionViewAdv collectionView

    The underlying collection view of the group.

    Properties

    CollectionView

    Gets the collection view of the group.

    Declaration
    public CollectionViewAdv CollectionView { get; }
    Property Value
    Type Description
    CollectionViewAdv

    The collection view of the group.

    DisplayElements

    Gets the GroupDisplayElements which contains the group and record information of the top level group.

    Declaration
    public GroupDisplayElements DisplayElements { get; }
    Property Value
    Type Description
    GroupDisplayElements

    The GroupDisplayElements which contains the group and record information of the top level group.

    Remarks

    The group and record can accessed from display elements when the data is grouped.

    GroupDescriptions

    Gets the collection of group descriptions in the SfDataGrid.

    Declaration
    public ObservableCollection<GroupDescription> GroupDescriptions { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GroupDescription>

    The collection of group descriptions in the SfDataGrid.

    IsTopLevelGroup

    Gets a value indicating whether this instance is top level group. Top-Level Group will be the first-level group.

    Declaration
    public override bool IsTopLevelGroup { get; }
    Property Value
    Type Description
    System.Boolean

    True if this instance is top level group, otherwise false.

    Overrides
    Group.IsTopLevelGroup

    RelationsCount

    Gets the relations count of the group, that link grid and allow navigation from parent grid to child grid.

    Declaration
    public virtual int RelationsCount { get; }
    Property Value
    Type Description
    System.Int32

    The relations count of the group, that link grid and allow navigation from parent grid to child grid.

    ResetCache

    Gets or sets a boolean value indicating whether to reset the cache.

    Declaration
    public bool ResetCache { get; set; }
    Property Value
    Type Description
    System.Boolean

    A boolean value indicating whether to reset the cache.

    Methods

    Add(Object, Boolean)

    Adds the given record to the group.

    Declaration
    public void Add(object record, bool isInSourceCollectionChange)
    Parameters
    Type Name Description
    System.Object record

    The record to be added to the group.

    System.Boolean isInSourceCollectionChange

    A boolean value indicating whether the source collection change is currently in progress.

    CalculateCaptionSummary(SummaryRecordEntry, String, Group)

    Group Caption Summary calculated while SummaryCalculationMode is OnDemandCaptionSummary

    Declaration
    public void CalculateCaptionSummary(SummaryRecordEntry summaryEntry, string columnName, Group group)
    Parameters
    Type Name Description
    SummaryRecordEntry summaryEntry

    Contains the summary details

    System.String columnName

    Contains the column mapping name

    Group group

    Contains group record of column

    CalculateGroupSummary(SummaryRecordEntry, String, Group)

    Calculate the summary for group when OnDemandGroupSummary is Enable

    Declaration
    public void CalculateGroupSummary(SummaryRecordEntry summaryRecordEntry, string columnName, Group group)
    Parameters
    Type Name Description
    SummaryRecordEntry summaryRecordEntry

    Cotains the summary Details

    System.String columnName

    Contains column name

    Group group

    Contains the group Details

    CollapseGroup(Group)

    Collapses the given group in the top-level group.

    Declaration
    public virtual int CollapseGroup(Group group)
    Parameters
    Type Name Description
    Group group

    The group to be collapsed.

    Returns
    Type Description
    System.Int32

    Returns the value indicating the items count in the given group.

    ComputeCount(Group, ref Int32)

    Computes the number of items in the given group.

    Declaration
    public void ComputeCount(Group group, ref int itemCount)
    Parameters
    Type Name Description
    Group group

    The group in which the items count is to be calculated.

    System.Int32 itemCount

    The number of items in the given group.

    Contains(Object)

    Determines whether the given record is found in the display elements of the TopLevelGroup.

    Declaration
    public bool Contains(object record)
    Parameters
    Type Name Description
    System.Object record

    The record to be found.

    Returns
    Type Description
    System.Boolean

    True if the specified record is found in the Top-level group, otherwise false.

    DeferRefresh()

    Gets a disposable defer helper to suspends the all data operations in view.

    Declaration
    protected IDisposable DeferRefresh()
    Returns
    Type Description
    System.IDisposable

    Returns disposable defer helper to do the bulk changes.

    Dispose(Boolean)

    Releases unmanaged and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    True to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    Group.Dispose(Boolean)

    ExpandGroup(Group)

    Expands the given group in the top-level group.

    Declaration
    public virtual int ExpandGroup(Group group)
    Parameters
    Type Name Description
    Group group

    The group to be expanded.

    Returns
    Type Description
    System.Int32

    Returns the value indicating the items count in the given group.

    GetGroupCaptionText(Group, String, String)

    Gets the group caption text for the specified Group.

    Declaration
    public virtual string GetGroupCaptionText(Group group, string groupSpecifierText, string columnHeaderName)
    Parameters
    Type Name Description
    Group group

    The group for which the caption text is to be obtained.

    System.String groupSpecifierText

    The specifier text of the group whose caption text is to be obtained.

    System.String columnHeaderName

    The Column's Header Name

    Returns
    Type Description
    System.String

    The group caption text for the specified Group.

    GetGroupCaptionTextList(Group, String, String)

    Gets the key-value pair of the group caption text list, which contains the text to be displayed in the summary for the specified Group.

    Declaration
    public KeyValuePair<string, List<string>> GetGroupCaptionTextList(Group group, string groupSpecifierText, string columnHeaderName)
    Parameters
    Type Name Description
    Group group

    The group for which the caption text is to be obtained.

    System.String groupSpecifierText

    The specifier text of the group whose caption text is to be obtained.

    System.String columnHeaderName

    The Column's Header Name

    Returns
    Type Description
    System.Collections.Generic.KeyValuePair<System.String, System.Collections.Generic.List<System.String>>

    The key-value pair of the group caption text list, which contains the text to be displayed in the summary for the specified Group.

    GetMaxLevel()

    Gets the maximum level of the group in the top-level group.

    Declaration
    public int GetMaxLevel()
    Returns
    Type Description
    System.Int32

    The max level of the group in the top-level group.

    GetUnderlyingSourceType()

    Gets the source type of the underlying collection view of the top-level group.

    Declaration
    protected virtual Type GetUnderlyingSourceType()
    Returns
    Type Description
    System.Type

    The source type of the underlying collection view of the top-level group.

    IndexOf(Object)

    Finds the index of the given record in the top-level group.

    Declaration
    public virtual int IndexOf(object record)
    Parameters
    Type Name Description
    System.Object record

    The record whose index is to be obtained.

    Returns
    Type Description
    System.Int32

    The index of the given record in the top-level group.

    Insert(Object, Int32, Boolean)

    Inserts the given record at the given index in the group.

    Declaration
    public void Insert(object record, int index, bool isInSourceCollectionChange)
    Parameters
    Type Name Description
    System.Object record

    The record to be inserted.

    System.Int32 index

    The index at which the given record is to be inserted.

    System.Boolean isInSourceCollectionChange

    A boolean value indicating whether the source collection change is currently in progress.

    Invalidate(Int32, Int32)

    Invalidates the group of the given index.

    Declaration
    public virtual void Invalidate(int index, int count)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the group to be invalidated.

    System.Int32 count

    The count of the groups to be invalidated from the given index.

    RefreshFilters()

    Refreshes the filter of the group.

    Declaration
    protected void RefreshFilters()

    RefreshSortingOrder()

    Refreshes the sorting order of the group.

    Declaration
    protected void RefreshSortingOrder()

    Remove(Object, Boolean)

    Removes the given record from the group.

    Declaration
    public virtual int Remove(object record, bool isInSourceCollectionChange)
    Parameters
    Type Name Description
    System.Object record

    The record to be removed.

    System.Boolean isInSourceCollectionChange

    A boolean value indicating whether the source collection change is currently in progress.

    Returns
    Type Description
    System.Int32

    A boolean value indicating whether the given record is removed.

    ResumeEvents()

    Resumes the events in the group, which resumes the view updates in the group.

    Declaration
    public void ResumeEvents()

    SuspendEvents()

    Suspends the events in the group, which suspends the view updates in the group.

    Declaration
    public void SuspendEvents()

    UpdateCaptionSummaries()

    Updates the caption summaries of the groups in the top-level group.

    Declaration
    public void UpdateCaptionSummaries()

    UpdateSummaries(Group)

    Updates the summaries for the specified Group in the top-level group.

    Declaration
    public void UpdateSummaries(Group group)
    Parameters
    Type Name Description
    Group group

    The group for which the summaries is to be updated.

    Explicit Interface Implementations

    IGroupRefresh.DeferRefresh()

    Gets a disposable defer helper to suspends the all data operations in view.

    Declaration
    IDisposable IGroupRefresh.DeferRefresh()
    Returns
    Type Description
    System.IDisposable

    Returns disposable defer helper to do the bulk changes.

    IGroupRefresh.RefreshFilters()

    Refreshes the filters.

    Declaration
    void IGroupRefresh.RefreshFilters()

    IGroupRefresh.RefreshSortingOrder()

    Refreshes the sorting order.

    Declaration
    void IGroupRefresh.RefreshSortingOrder()

    Implements

    System.IDisposable
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IGroupRefresh
    IGroupList

    Extension Methods

    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>, Int32)
    FunctionalExtensions.Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    FunctionalExtensions.Fold<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldLeft<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldRight<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.ToObservableCollection<T>(IEnumerable<T>)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, String[], IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, List<String>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved