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.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Data
Assembly: Syncfusion.Maui.Data.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<ColumnGroupDescription> GroupDescriptions { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ColumnGroupDescription> | 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
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
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. |
UpdateSummaries(String, Group)
Updates the summaries for the specified Group in the top-level group.
Declaration
public void UpdateSummaries(string PropertyName, Group group)
Parameters
Type | Name | Description |
---|---|---|
System.String | PropertyName | |
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()