Class GridChildTable
A ChildTable is either a TopLevelGroup or a group that can be referenced as a 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.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridChildTable : ChildTable, IDisposable, IDisposedEvent, IIsDisposedProperty, ITreeTableCounterSource, ITreeTableSummaryArraySource, IContainerElement, IElementTreeTableSource, IElement, IGridTableCellAppearanceSource, IGridGroupOptionsSource
Remarks
A ChildTable defines a group of records that belong to a category specified with RelationKeys. ChildTables are created just like 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 a 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 Groups 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
GridChildTable(Element)
Initializes a new instance of the GridChildTable class.
Declaration
public GridChildTable(Element parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Element | parent | The parent element this object belongs to. |
Properties
Appearance
Gets or sets The default GridTableCellAppearance with GridTableCellStyleInfo information for cells of this element.
Declaration
public GridTableCellAppearance Appearance { get; set; }
Property Value
| Type |
|---|
| GridTableCellAppearance |
CurrentCell
The current cell for this child table.
Declaration
public GridCurrentCell CurrentCell { get; set; }
Property Value
| Type |
|---|
| GridCurrentCell |
Engine
Gets the engine this element belongs to.
Declaration
public GridEngine Engine { get; }
Property Value
| Type |
|---|
| GridEngine |
EngineTable
Gets the GridTable of the engine this element belongs to.
Declaration
public GridTable EngineTable { get; }
Property Value
| Type |
|---|
| GridTable |
GroupOptions
Gets or sets the look of inner groups such as whether the Caption Row is visible or what CaptionText is.
Declaration
public GridGroupOptionsStyleInfo GroupOptions { get; set; }
Property Value
| Type |
|---|
| GridGroupOptionsStyleInfo |
HasGroupOptions
Gets the value of the GroupOptions if it has specified.
Declaration
public bool HasGroupOptions { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsCollapsible
Indicates whether this element can be collapsed.
Declaration
public override bool IsCollapsible { get; }
Property Value
| Type |
|---|
| System.Boolean |
Overrides
ParentChildTable
Gets a reference to the child table this element belongs.
Declaration
public GridChildTable ParentChildTable { get; }
Property Value
| Type |
|---|
| GridChildTable |
ParentRecord
Gets a reference to the parent record this element belongs to.
Declaration
public GridRecord ParentRecord { get; }
Property Value
| Type |
|---|
| GridRecord |
ParentTable
Gets or sets a reference to the parent table this section belongs to.
Declaration
public GridTable ParentTable { get; set; }
Property Value
| Type |
|---|
| GridTable |
ParentTableDescriptor
Gets the table descriptor this element belongs to.
Declaration
public GridTableDescriptor ParentTableDescriptor { get; }
Property Value
| Type |
|---|
| GridTableDescriptor |
ReadGroupOptions
Gets the GroupOptions, If this element is modified; otherwise it returns a GridGroupOptionsStyleInfo of the first parent element with GroupOptions in the hierarchy.
Declaration
public GridGroupOptionsStyleInfo ReadGroupOptions { get; }
Property Value
| Type |
|---|
| GridGroupOptionsStyleInfo |
ReadOnlyAppearance
Gets the Appearance of the grid table, If this element is modified; otherwise it returns a GridTableCellAppearance of the first parent element with appearance in the hierarchy.
Declaration
public GridTableCellAppearance ReadOnlyAppearance { get; }
Property Value
| Type |
|---|
| GridTableCellAppearance |
SelectedRanges
Internal only.
Declaration
public virtual GridRangeInfoList SelectedRanges { get; }
Property Value
| Type |
|---|
| GridRangeInfoList |
Methods
CreateGroupTypedListRecordsCollection()
Create GroupTypedListRecordsCollection
Declaration
protected override GroupTypedListRecordsCollection CreateGroupTypedListRecordsCollection()
Returns
| Type | Description |
|---|---|
| GroupTypedListRecordsCollection | returns GroupTypedListRecordsCollection |
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
Overrides
GetBaseAppearance()
Returns a GridTableCellAppearance of the first parent element with appearance in the hierarchy.
Declaration
public GridTableCellAppearance GetBaseAppearance()
Returns
| Type | Description |
|---|---|
| GridTableCellAppearance | A GridTableCellAppearance of this element. |
GetGroupCaptionDisplayText(String)
Gets the caption text for a group using a specified format.
Declaration
public string GetGroupCaptionDisplayText(string format)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | format | See GroupOptions.CaptionText, e.g. "{CategoryCaption}: {Category} - {RecordCount} Items"; |
Returns
| Type | Description |
|---|---|
| System.String | Group caption display text. |
GetGroupCaptionText()
Gets the caption text for a group.
Declaration
public string GetGroupCaptionText()
Returns
| Type | Description |
|---|---|
| System.String | Caption text for a group. |
GetSummaryText(GridSummaryColumnDescriptor)
Returns the formatted summary text for the given group and summary column.
Declaration
public string GetSummaryText(GridSummaryColumnDescriptor scd)
Parameters
| Type | Name | Description |
|---|---|---|
| GridSummaryColumnDescriptor | scd | The GridSummaryColumnDescriptor provides the GridSummaryColumnDescriptorCollection. |
Returns
| Type | Description |
|---|---|
| System.String | The summary formatted text as specified with GridSummaryColumnDescriptor.Format |
GetSummaryText(String, String)
Returns the formatted summary text for the given group, summary row and column.
Declaration
public string GetSummaryText(string summaryRowName, string summaryColumnName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | summaryRowName | The name of the GridSummaryRowDescriptor in the GridTableDescriptor.SummaryRows collection. |
| System.String | summaryColumnName | The name of the GridSummaryColumnDescriptor in the GridSummaryRowDescriptor.Summaries collection. |
Returns
| Type | Description |
|---|---|
| System.String | The summary formatted text as specified with GridSummaryColumnDescriptor.Format |
Remarks
See GridSummaryColumnDescriptor for an example.
See Also
IsChildVisible(Element)
Determines whether the child of current element is visible.
Declaration
public override bool IsChildVisible(Element el)
Parameters
| Type | Name | Description |
|---|---|---|
| Element | el | The specified element. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if it is visible; False otherwise. |
Overrides
OnEnsureInitialized(Object)
This virtual method is called from OnEnsureInitialized(Object) and lets derived elements implement element-specific logic to ensure object is up to data.
Declaration
protected override bool OnEnsureInitialized(object sender)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The object that triggered the EnsureInitialized(Object) call. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if changes were detected and the object was updated; False otherwise. |
Overrides
OnInitializeSections(Boolean, SortColumnDescriptorCollection)
Declaration
protected override void OnInitializeSections(bool hasRecords, SortColumnDescriptorCollection fields)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | hasRecords | |
| SortColumnDescriptorCollection | fields |
Overrides
OnInitializeVisibleCounters()
Declaration
protected override void OnInitializeVisibleCounters()
Overrides
ResetAppearance()
Discards any changes for the Appearance object.
Declaration
public void ResetAppearance()
ShouldSerializeAppearance()
Determines whether Appearance has been modified and contents should be serialized at design-time.
Declaration
public bool ShouldSerializeAppearance()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if contents were changed; False otherwise. |
ShouldShowCaption()
Indicates whether caption row is visible.
Declaration
public override bool ShouldShowCaption()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if it is visible; False otherwise. |
Overrides
Explicit Interface Implementations
IGridGroupOptionsSource.GetParentGroupOptionsSource()
Returns a IGridGroupOptionsSource of the first parent element with group options in the hierarchy.
Declaration
IGridGroupOptionsSource IGridGroupOptionsSource.GetParentGroupOptionsSource()
Returns
| Type | Description |
|---|---|
| IGridGroupOptionsSource | returns IGridGroupOptionsSource for hosting GridGroupOptionStyleInfo |
IGridGroupOptionsSource.RaiseGroupOptionsChanged(GridGroupOptionsChangedEventArgs)
Declaration
void IGridGroupOptionsSource.RaiseGroupOptionsChanged(GridGroupOptionsChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| GridGroupOptionsChangedEventArgs | e |
IGridGroupOptionsSource.RaiseGroupOptionsChanging(GridGroupOptionsChangedEventArgs)
Declaration
void IGridGroupOptionsSource.RaiseGroupOptionsChanging(GridGroupOptionsChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| GridGroupOptionsChangedEventArgs | e |
IGridTableCellAppearanceSource.GetAppearance()
Declaration
GridTableCellAppearance IGridTableCellAppearanceSource.GetAppearance()
Returns
| Type |
|---|
| GridTableCellAppearance |
IGridTableCellAppearanceSource.RaiseAppearanceChanged(GridTableCellStyleInfoChangedEventArgs)
Declaration
void IGridTableCellAppearanceSource.RaiseAppearanceChanged(GridTableCellStyleInfoChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoChangedEventArgs | e |
IGridTableCellAppearanceSource.RaiseAppearanceChanging(GridTableCellStyleInfoChangedEventArgs)
Declaration
void IGridTableCellAppearanceSource.RaiseAppearanceChanging(GridTableCellStyleInfoChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoChangedEventArgs | e |