Class ChildTable
Defines a class for ChildTable which is either a TopLevelGroup or a group that can be referenced as nested table from a record in a parent table. ChildTable groups are created for every new key found based on RelationKeys.
You can get access to a ChildTable through the ChildTable property of a NestedTable in a record.
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class ChildTable : Group, IDisposable, IDisposedEvent, IIsDisposedProperty, ITreeTableCounterSource, ITreeTableSummaryArraySource, IContainerElement, IElementTreeTableSource, IElement
Remarks
A ChildTable defines a group of records that belong to a category specified with RelationKeys. ChildTables are created similar to regular groups when the records of the table are categorized or when a new record is inserted. The collection in the TableDescriptor that defines categorization is the RelationChildColumns collection. RelationChildColumns will be added when there is a parent-child relation between two tables. The child table of such relation must be sorted by the columns that are used to identify a record. These columns match the foreign key columns of the parent table. For every new category key with regards to RelationChildColumns a ChildTable is created. The ChildTable class is derived from Group.
A child table can either be a final node with records or it can be a node with nested groups. If a group has records, its Groups collection will be empty and the Records collection will contain all records. If a group has nested groups, its Group collection will have the nested groups and the Records collection will be empty.
A child table can be expanded and collapsed with its IsExpanded property. Expansion of child tables will show or hide nested elements of the group within the DisplayElements and NestedDisplayElements collection.
A table has at least one child table. The TopLevelGroup is a ChildTable which is derived from Group.
Constructors
ChildTable(Element)
Initializes a new instance of the ChildTable class and assigns the parent.
Declaration
public ChildTable(Element parent)
Parameters
Type | Name | Description |
---|---|---|
Element | parent | The parent element this object belongs to. |
Properties
DisplayElements
Gets a flat collection of visible elements in the child table that are expanded and meets filter criteria and the collection doesn't steps into nested tables.
Declaration
public DisplayElementsInTableCollection DisplayElements { get; }
Property Value
Type |
---|
DisplayElementsInTableCollection |
Remarks
All records, groups, and sections are only returned by this collection if they are expanded and meet filter criteria. The collection does not step into nested tables.
Elements
Gets a flat collection of all elements in the child table irrespective of the expanded state or meets filter criteria and the collection doesn't step into nested tables.
Declaration
public ElementsInTableCollection Elements { get; }
Property Value
Type |
---|
ElementsInTableCollection |
Remarks
All records, groups, and sections are returned by this collection no matter if they were expanded or meet filter criteria. The collection does not step into nested tables.
IsTopLevelGroup
Gets the value indicating whether this is the TopLevelGroup or not.
Declaration
public override bool IsTopLevelGroup { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Name
Gets the name of table descriptor.
Declaration
public override string Name { get; }
Property Value
Type |
---|
System.String |
Overrides
NestedDisplayElements
Gets a flat collection of visible elements in the child table that are expanded and meets filter criteria and the collection steps into nested tables.
Declaration
public DisplayElementsInTableCollection NestedDisplayElements { get; }
Property Value
Type |
---|
DisplayElementsInTableCollection |
Remarks
All records, groups, and sections are only returned by this collection if they are expanded and meet filter criteria. The collection steps into nested tables.
NestedElements
Gets a flat collection of all elements in the child table irrespective of the expanded state or meets filter criteria and the collection steps into nested tables.
Declaration
public ElementsInTableCollection NestedElements { get; }
Property Value
Type |
---|
ElementsInTableCollection |
Remarks
All records, groups, and sections are returned by this collection no matter if they were expanded or meet filter criteria. The collection steps into nested tables.
ParentDisplayElement
Gets the value of the parent the element belongs to.
Declaration
public override Element ParentDisplayElement { get; }
Property Value
Type |
---|
Element |
Overrides
ParentNestedTable
Gets the reference to the parent nested table this element belongs to.
Declaration
public NestedTable ParentNestedTable { get; }
Property Value
Type |
---|
NestedTable |
Methods
ContainsCurrentRecordOrChildTable()
Determines whether this child table contains CurrentElement or not.
Declaration
public bool ContainsCurrentRecordOrChildTable()
Returns
Type | Description |
---|---|
System.Boolean | If Truethe child table contains CurrentElement; Otherwise False. |
Dispose(Boolean)
Overrides and manages the unwanted resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
InvalidateCounter()
Overrides and resets the counter.
Declaration
public override void InvalidateCounter()
Overrides
InvalidateCounterTopDown(Boolean)
Overrides and walks down to child branches and resets all counter.
Declaration
public override void InvalidateCounterTopDown(bool notifyCounterSource)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | notifyCounterSource |
Overrides
InvalidateSummariesBottomUp()
Overrides and walks up parent branches and resets all summaries.
Declaration
public override void InvalidateSummariesBottomUp()
Overrides
LeaveRecord(Boolean)
Deactivates the current record and calls LeaveRecord(Boolean) on the ParentTable.
Declaration
public void LeaveRecord(bool cancelEditIfNotValid)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | cancelEditIfNotValid | True if any changes should be discarded if they do not meet validation constraints; False if record should not be deactivated if not valid. |