WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridRecord - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridRecord

    Represents a record with data. Each record in the datasource has an associated Record object in the engine. Records are created when the datasource is assigned to a table and before they are sorted or filtered. Also when a new record is inserted in the datasource, a Record is created. When the grouping or sorting of a Table changes, all Record elements stay in sync with their underlying record-counterparts in the datasource.

    By default a record will not appear in the DisplayElements. Instead a record serves as a container of multiple row elements and nested tables.

    Inheritance
    System.Object
    Element
    Record
    GridRecord
    GridRecordWithValueCache
    Implements
    System.IDisposable
    ITreeTableCounterSource
    ITreeTableSummaryArraySource
    System.IComparable
    System.ICloneable
    IGridTableCellAppearanceSource
    IGridTableCellStyleChanged
    Inherited Members
    Record.SupportsId()
    Record.GetDisplayElementOffsetOfFirstNestedTable()
    Record.GetExpandedVisibleCount()
    Record.GetCollapsedVisibleCount()
    Record.GetNestedTablesVisibleCount()
    Record.GetRecordRowsVisibleCount()
    Record.GetRecordPreviewRowsVisibleCount()
    Record.Delete()
    Record.SetCurrent()
    Record.SetCurrent(String)
    Record.BeginEdit()
    Record.EndEdit()
    Record.EndEdit(Record)
    Record.CancelEdit()
    Record.SetValue(FieldDescriptor, Object)
    Record.SetValue(String, Object)
    Record.GetValue(String)
    Record.InvalidateSummariesBottomUp()
    Record.GetSourceIndex()
    Record.SetSourceIndex(Int32, Int32, Object)
    Record.GetUniformChildListSourceIndex()
    Record.IsSelected()
    Record.SetSelected(Boolean)
    Record.SetSelectedRecursive(Boolean)
    Record.GetData()
    Record.UpdateSortInfo(Boolean, SortColumnDescriptor[], PropertyDescriptor[])
    Record.UpdatePrimaryKeys(Boolean, SortColumnDescriptor[], PropertyDescriptor[])
    Record.GetSummaries(Table, Boolean)
    Record.GetNextRecord()
    Record.GetPreviousRecord()
    Record.DetachFromGroup()
    Record.AttachToGroup()
    Record.ReinsertRecord()
    Record.MeetsFilterCriteria()
    Record.InvalidateCounter()
    Record.OnElementTreeInvalidateCounterBottomUp()
    Record.GetVisibleCount()
    Record.GetCounter()
    Record.GetYAmountCount()
    Record.GetCustomCount()
    Record.GetVisibleCustomCount()
    Record.IsChildVisible(Element)
    Record.SetExpanded(Boolean, Boolean, Boolean)
    Record.GetFilteredRecordCount()
    Record.GetRecordCount()
    Record.InvalidateCounterTopDown(Boolean)
    Record.InvalidateCounterBottomUp()
    Record.OnEnsureInitialized(Object)
    Record.InvalidateSummariesTopDown()
    Record.InvalidateSummary()
    Record.FieldsToString()
    Record.ToString()
    Record.OnBeginEditCalled()
    Record.OnBeginEditComplete(Boolean)
    Record.OnEndEditCalled()
    Record.OnEndEditComplete(Boolean)
    Record.OnCancelEditCalled()
    Record.OnCancelEditComplete(Boolean)
    Record.OnLeaveRecordCalled()
    Record.OnLeaveRecordComplete(Boolean)
    Record.OnEnterRecordCalled()
    Record.OnEnterRecordComplete(Boolean)
    Record.GetRelatedRecord(RelationDescriptor)
    Record.GetRelatedRecord(RelationDescriptor, FieldDescriptor, Object)
    Record.GetRelatedChildTable(RelationDescriptor)
    Record.GetParentRecord(Element)
    Record.AdjustRecordRowCount()
    Record.GetElementCount()
    Record.CompareTo(Object)
    Record.EnsureValues()
    Record.ResetValues()
    Record.GetOldValue(Int32)
    Record.CompareAndUpdateValues()
    Record.UpdateValues(IEnumerable)
    Record.Clone()
    Record.Id
    Record.Item[String]
    Record.Kind
    Record.RecordParts
    Record.IsCurrent
    Record.IsEditing
    Record.Parent
    Record.ParentDetails
    Record.SortKeys
    Record.PrimaryKeys
    Record.IsInitialized
    Record.IsExpanded
    Record.HasNestedTables
    Record.RecordRows
    Record.RecordPreviewRows
    Record.NestedTables
    Element.Dispose()
    Element.OnDisposed(EventArgs)
    Element.EnsureInitialized(Object)
    Element.EnsureInitialized(Object, Boolean)
    Element.GetSummaries(Table)
    Element.GetVisibleInParent()
    Element.GetVisibleInHierarchy()
    Element.GetChildCount()
    Element.GetCustomPosition()
    Element.GetVisibleCustomPosition()
    Element.ITreeTableSummaryArraySource.GetSummaries(ITreeTableEmptySummaryArraySource, Boolean)
    Element.IsCaption(Element)
    Element.IsRecord(Element)
    Element.IsColumnHeader(Element)
    Element.IsFilterBar(Element)
    Element.IsCaption()
    Element.IsRecord()
    Element.IsColumnHeader()
    Element.IsFilterBar()
    Element.GetCaptionSection(Element)
    Element.GetRecord(Element)
    Element.GetColumnHeaderSection(Element)
    Element.GetFilterBar(Element)
    Element.GetCaptionSection()
    Element.GetRecord()
    Element.GetColumnHeaderSection()
    Element.GetFilterBar()
    Element.TableLevel
    Element.Reserved1
    Element.Reserved2
    Element.Reserved3
    Element.Reserved4
    Element.Reserved5
    Element.Reserved6
    Element.Reserved7
    Element.Reserved8
    Element.Reserved9
    Element.Reserved10
    Element.Reserved11
    Element.Reserved16a
    Element.Reserved16b
    Element.Reserved16c
    Element.Info
    Element.Disposing
    Element.IsDisposed
    Element.InDisposed
    Element.ParentElement
    Element.ParentDisplayElement
    Element.ParentGroup
    Element.ParentSection
    Element.GroupLevel
    Element.ChildTableGroupLevel
    Element.Disposed
    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.Windows.Forms.Grid.Grouping
    Assembly: Syncfusion.Grid.Grouping.Windows.dll
    Syntax
    public class GridRecord : Record, IDisposable, IDisposedEvent, IIsDisposedProperty, ITreeTableCounterSource, ITreeTableSummaryArraySource, IContainerElement, IElementTreeTableSource, IElement, IComparable, ICloneable, IGridTableCellAppearanceSource, IGridTableCellStyleChanged
    Remarks

    There are multiple ways to get access to a specific record:

    • The UnsortedRecords collection of the Table class provides access to the records in the same order as they appear in the datasource. The IndexOf(Record) method of an UnsortedRecordsCollection determines the index of any record in the underlying datasource.
    • The Records collection of the Table class provides access to the records in the order as they were sorted in the engine. The IndexOf(Record) method of a RecordsInTableCollection determines the index of any record in the Table.Records collection.
    • The FilteredRecords collection of the Table class provides access to records that meet filter criteria in the order as they were sorted in the engine. The IndexOf(Record) method of a RecordsInTableCollection determines the index of any record in the Table.FilteredRecords collection.
    • The Records collection of the Group class provides access to the records in the order as they appear in the group. The RecordsInDetailsCollection method of a RecordsInDetailsCollection determines the index of any record in the Group.Records collection.
    • The FilteredRecords collection of the Group class provides access to the records in the order as they appear in the group. The IndexOf(Record) method of a FilteredRecordsInDetailsCollection determines the index of any record in the Group.FilteredRecords collection.

    Given a RecordRow or NestedTable, you can query its ParentRecord property to determine which record these elements belong to.

    Since record elements always stay in sync with their underlying record-counterparts in the datasource, you can keep a bookmark (reference) to a record. For example you can save a reference to a record, change the sort order of the table, and then later check Records.IndexOf to determine the new position where the record can be located after the sort.

    By default, a record will not appear in the DisplayElements. Instead a record serves as a container for multiple row elements and nested tables. One exception is if you specified RecordAsDisplayElements. You can set RecordAsDisplayElements to True if you do not want the engine to treat record and ColumnHeaderSection elements as ContainerElements and instead have these elements be returned as a display element in the Table.DisplayElements collection. However, with a GridGroupingControl you must not change this property since a GridGroupingControl relies on the behavior that a record is not a display element but a container for rows and nested tables.

    The GetData() method will return a reference to the original record with data in the datasource.

    A record can be navigated to a current record if you call its Record method.

    Individual field contents can be retrieved with its Record method.

    Constructors

    GridRecord(Table)

    Initializes a new instance of the GridRecord class.

    Declaration
    public GridRecord(Table parent)
    Parameters
    Type Name Description
    Table parent

    The table this record 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 Description
    GridTableCellAppearance

    Engine

    Gets the engine this element belongs to.

    Declaration
    public GridEngine Engine { get; }
    Property Value
    Type Description
    GridEngine

    EngineTable

    Gets the GridTable of the engine this element belongs to.

    Declaration
    public GridTable EngineTable { get; }
    Property Value
    Type Description
    GridTable

    IsCollapsible

    Gets whether this element is collapsible.

    Declaration
    public override bool IsCollapsible { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Record.IsCollapsible

    ParentChildTable

    Gets a reference to the child table this element belongs.

    Declaration
    public GridChildTable ParentChildTable { get; }
    Property Value
    Type Description
    GridChildTable

    ParentRecord

    Gets a reference to the parent record this element belongs to.

    Declaration
    public GridRecord ParentRecord { get; }
    Property Value
    Type Description
    GridRecord

    ParentTable

    Gets or sets a reference to the parent table this section belongs to.

    Declaration
    public GridTable ParentTable { get; set; }
    Property Value
    Type Description
    GridTable

    ParentTableDescriptor

    Gets the table descriptor this element belongs to.

    Declaration
    public GridTableDescriptor ParentTableDescriptor { get; }
    Property Value
    Type Description
    GridTableDescriptor

    ReadOnlyAppearance

    Gets the object's Appearance 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 Description
    GridTableCellAppearance

    Methods

    Dispose(Boolean)

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

    GetBaseAppearance()

    Returns a GridTableCellAppearance of the first parent element with appearance in the hierarchy.

    Declaration
    public GridTableCellAppearance GetBaseAppearance()
    Returns
    Type Description
    GridTableCellAppearance

    A GridTableCellAppearance.

    GetValue(FieldDescriptor)

    Overridden to get the display member value for filtering a column.

    Declaration
    public override object GetValue(FieldDescriptor fieldDescriptor)
    Parameters
    Type Name Description
    FieldDescriptor fieldDescriptor

    The field to be retrieved.

    Returns
    Type Description
    System.Object

    The display member value if it is having the display member. otherwise returns the value member.

    Overrides
    Record.GetValue(FieldDescriptor)

    GetValue(SortColumnDescriptor)

    Gets the value of the record.

    Declaration
    public override object GetValue(SortColumnDescriptor cd)
    Parameters
    Type Name Description
    SortColumnDescriptor cd

    The field to be retrieved.

    Returns
    Type Description
    System.Object

    Record value.

    Overrides
    Record.GetValue(SortColumnDescriptor)

    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.

    ShouldShowRecordPreviewRows()

    Determines whether the record preview rows should be made visible.

    Declaration
    public override bool ShouldShowRecordPreviewRows()
    Returns
    Type Description
    System.Boolean

    True if they are visible.

    Overrides
    Record.ShouldShowRecordPreviewRows()

    ShouldShowRecordRows()

    Determines whether the record rows should be visible.

    Declaration
    public override bool ShouldShowRecordRows()
    Returns
    Type Description
    System.Boolean

    True if they are visible.

    Overrides
    Record.ShouldShowRecordRows()

    Explicit Interface Implementations

    IGridTableCellAppearanceSource.GetAppearance()

    Declaration
    GridTableCellAppearance IGridTableCellAppearanceSource.GetAppearance()
    Returns
    Type Description
    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

    IGridTableCellStyleChanged.RaiseTableCellStyleChanged(GridTableCellStyleInfoEventArgs)

    Declaration
    void IGridTableCellStyleChanged.RaiseTableCellStyleChanged(GridTableCellStyleInfoEventArgs e)
    Parameters
    Type Name Description
    GridTableCellStyleInfoEventArgs e

    Implements

    System.IDisposable
    ITreeTableCounterSource
    ITreeTableSummaryArraySource
    System.IComparable
    System.ICloneable
    IGridTableCellAppearanceSource
    IGridTableCellStyleChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved