Class Record
Represents a record with data. Each record in the data source has an associated Record object in the engine. Records are created when the data source is assigned to a table and before it is sorted or filtered. When a new record is inserted in the data source, 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 data source.
By default, a record will not appear in the DisplayElements. Instead, a record serves as a container of multiple row elements and nested tables.
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class Record : Element, IDisposable, IDisposedEvent, IIsDisposedProperty, ITreeTableCounterSource, ITreeTableSummaryArraySource, IContainerElement, IElementTreeTableSource, IElement, IComparable, ICloneable
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 data source. The IndexOf(Record) method of an UnsortedRecordsCollection determines the index of any record in the underlying data source.
- 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 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 IndexOf(Record) 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 data source, 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 of 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 give return a reference to the original record with data in the data source.
A record can be navigated to a current record if you call its SetCurrent(String) method.
Individual field contents can be retrieved with the GetValue(SortColumnDescriptor) method.
Constructors
Record(Table)
Initializes a new Record in the specified parent table.
Declaration
public Record(Table parentTable)
Parameters
Type | Name | Description |
---|---|---|
Table | parentTable | The table this record belongs to. |
Properties
HasNestedTables
Determines if record has nested tables.
Declaration
public bool HasNestedTables { get; }
Property Value
Type |
---|
System.Boolean |
Id
Gets or sets the key to identify this object.
Declaration
public override int Id { get; set; }
Property Value
Type |
---|
System.Int32 |
Overrides
IsCollapsible
Gets if record can be collapsed.
Declaration
public virtual bool IsCollapsible { get; }
Property Value
Type |
---|
System.Boolean |
IsCurrent
Determines if this record is the current record in the parent table.
Declaration
public bool IsCurrent { get; }
Property Value
Type |
---|
System.Boolean |
IsEditing
Determines if this record is the current record in the parent table and if BeginEdit was called.
Declaration
public bool IsEditing { get; }
Property Value
Type |
---|
System.Boolean |
IsExpanded
Gets or sets the records expansion state.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type |
---|
System.Boolean |
IsInitialized
Determines if the record has been added to the table and inserted into a group.
Declaration
public bool IsInitialized { get; }
Property Value
Type |
---|
System.Boolean |
Item[String]
Gets the value from the underlying data source.
Declaration
public object this[string columnName] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | columnName | The field to be retrieved. |
Property Value
Type | Description |
---|---|
System.Object | Returns value from the underlying data source |
Kind
Gets the display element kind.
Declaration
public override DisplayElementKind Kind { get; }
Property Value
Type |
---|
DisplayElementKind |
Overrides
NestedTables
Gets the collection of NestedTable elements that belong to this record.
Declaration
public NestedTablesCollection NestedTables { get; }
Property Value
Type |
---|
NestedTablesCollection |
Parent
A reference to the parent record in a UnformChildList relation. Is not defined for other relation kinds.
Declaration
public Record Parent { get; set; }
Property Value
Type |
---|
Record |
ParentDetails
Gets or sets the RecordsDetails this record belongs to.
Declaration
public RecordsDetails ParentDetails { get; set; }
Property Value
Type |
---|
RecordsDetails |
PrimaryKeys
Gets the array of primary keys that define this record.
Declaration
public object[] PrimaryKeys { get; }
Property Value
Type |
---|
System.Object[] |
RecordParts
Returns the collection of record parts which includes RecordRowsPart, RecordNestedTablesPart, and RecordPreviewRowsPart.
Declaration
public RecordPartInRecordCollection RecordParts { get; }
Property Value
Type |
---|
RecordPartInRecordCollection |
RecordPreviewRows
Gets the collection of RecordPreviewRow elements that belong to this record.
Declaration
public RecordPreviewRowCollection RecordPreviewRows { get; }
Property Value
Type |
---|
RecordPreviewRowCollection |
RecordRows
Gets the collection of RecordRow elements that belong to this record.
Declaration
public RecordRowCollection RecordRows { get; }
Property Value
Type |
---|
RecordRowCollection |
SortKeys
Gets the array of sort keys that define the sort-order of this record.
Declaration
public object[] SortKeys { get; }
Property Value
Type |
---|
System.Object[] |
Methods
AdjustRecordRowCount()
Determines whether adjusts the record row count.
Declaration
protected bool AdjustRecordRowCount()
Returns
Type | Description |
---|---|
System.Boolean | Returns Record RowCount. |
AttachToGroup()
Inserts the record into the same group at the correct sort position. AttachToGroup inserts it into the same group the record used to belong to before it was detached. Call ReinsertRecord if the record should be inserted into a different group.
Declaration
public int AttachToGroup()
Returns
Type | Description |
---|---|
System.Int32 | Returns the index if added to the group; Otherwise -1. |
BeginEdit()
Determines whether makes this record the current record in the parent table and calls BeginEdit().
Declaration
public bool BeginEdit()
Returns
Type | Description |
---|---|
System.Boolean | True if record could be made current record and BeginEdit was successful; False otherwise. |
CancelEdit()
Determines whether discards pending changes after BeginEdit() was called.
Declaration
public bool CancelEdit()
Returns
Type | Description |
---|---|
System.Boolean | True if changes could be discarded; False otherwise. |
Clone()
Creates the copies of an record.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | Copy of the record. |
CompareAndUpdateValues()
Returns an ArrayList with ChangedFieldInfo objects and updates the values in the record with changes found in underlying datasource. Only fields with a PropertyDescriptor are updated, others (unbound, expression fields) are ignored. The method is implemented only in the RecordWithValueCache class.
Declaration
public virtual ChangedFieldInfoCollection CompareAndUpdateValues()
Returns
Type | Description |
---|---|
ChangedFieldInfoCollection | The collection with detected changes. |
CompareTo(Object)
Compares to records unsorted source position.
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Record object to compare. |
Returns
Type | Description |
---|---|
System.Int32 | A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj. Greater than zero This instance follows obj in the sort order. |
Delete()
Deletes the record from the underlying data source.
Declaration
public void Delete()
DetachFromGroup()
Detaches the record temporarily from the group and so that it can be reinserted at a new sort position with a call to AttachToGroup or ReinsertRecord.
Declaration
public int DetachFromGroup()
Returns
Type | Description |
---|---|
System.Int32 | Returns -1. |
Dispose(Boolean)
Disposes the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
EndEdit()
Determines whether saves pending changes to the data source after BeginEdit() was called.
Declaration
public bool EndEdit()
Returns
Type | Description |
---|---|
System.Boolean | True if changes could be saved; False otherwise. |
EndEdit(out Record)
Determines whether saves pending changes to the data source after BeginEdit() was called.
Declaration
public bool EndEdit(out Record record)
Parameters
Type | Name | Description |
---|---|---|
Record | record | Returns the record that was changed. Normally this is a reference to the current record. But if the current record is an AddNewRecord, a new record will be added to the table and instead of returning the AddNewRecord, a reference to the newly created Record element is returned. |
Returns
Type | Description |
---|---|
System.Boolean | True if changes could be saved; False otherwise. |
EnsureValues()
Ensures that record values are cached. The method is implemented only in the RecordWithValueCache class.
Declaration
public virtual void EnsureValues()
FieldsToString()
Returns a concatenated string with fields and their values in the record.
Declaration
public string FieldsToString()
Returns
Type | Description |
---|---|
System.String | String with debug information. |
GetCollapsedVisibleCount()
Returns what the number of visible rows would be if the record is collapsed.
Declaration
public int GetCollapsedVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of visible rows if the record is collapsed. |
GetCounter()
Gets the counter.
Declaration
public override ITreeTableCounter GetCounter()
Returns
Type | Description |
---|---|
ITreeTableCounter | Returns Counter. |
Overrides
GetCustomCount()
Gets the custom count for the element.
Declaration
public override double GetCustomCount()
Returns
Type | Description |
---|---|
System.Double | Custom count. |
Overrides
GetData()
Gets the record data.
Declaration
public override object GetData()
Returns
Type | Description |
---|---|
System.Object | Record data. |
Overrides
GetDisplayElementOffsetOfFirstNestedTable()
Returns the relative row position where the first nested table is displayed.
Declaration
public int GetDisplayElementOffsetOfFirstNestedTable()
Returns
Type | Description |
---|---|
System.Int32 | The relative row position where the first nested table is displayed (zero-based). |
GetElementCount()
Gets the number of elements.
Declaration
public override int GetElementCount()
Returns
Type | Description |
---|---|
System.Int32 | Element count. |
Overrides
GetExpandedVisibleCount()
Returns what the number of visible rows including rows in nested tables would be if the record is expanded.
Declaration
public int GetExpandedVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of visible rows including rows in nested tables if the record is expanded. |
GetFilteredRecordCount()
Gets the number of filtered records.
Declaration
public override int GetFilteredRecordCount()
Returns
Type | Description |
---|---|
System.Int32 | Filtered record count. |
Overrides
GetNestedTablesVisibleCount()
Returns what the number of visible rows in nested tables would be if the record is expanded.
Declaration
public int GetNestedTablesVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of visible rows in nested tables if the record is expanded. |
GetNextRecord()
Returns the next record in the Table.Records collection.
Declaration
public Record GetNextRecord()
Returns
Type | Description |
---|---|
Record | Next record. |
GetOldValue(Int32)
Returns the old value for a record. The record class will look up changed values in the Table.ChangeFieldsArray
Declaration
public virtual object GetOldValue(int fieldIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldIndex | Field index. |
Returns
Type | Description |
---|---|
System.Object | Old value of the record. |
GetParentRecord(Element)
Gets the parent record. For internal use.
Declaration
public static Record GetParentRecord(Element el)
Parameters
Type | Name | Description |
---|---|---|
Element | el |
Returns
Type | Description |
---|---|
Record | Returns ParentRecord. |
GetPreviousRecord()
Returns the previous record in the Table.Records collection.
Declaration
public Record GetPreviousRecord()
Returns
Type | Description |
---|---|
Record | Previous record. |
GetRecordCount()
Gets the number of records.
Declaration
public override int GetRecordCount()
Returns
Type | Description |
---|---|
System.Int32 | Record count. |
Overrides
GetRecordPreviewRowsVisibleCount()
Returns what the number of visible preview rows would be if the record is collapsed.
Declaration
public int GetRecordPreviewRowsVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of visible preview rows if the record is collapsed. |
GetRecordRowsVisibleCount()
Returns the number of visible record rows excluding nested tables.
Declaration
public int GetRecordRowsVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of visible record rows excluding nested tables. |
GetRelatedChildTable(RelationDescriptor)
Returns a ChildTable from a related table with a RelationKind.ForeignKeyKeyWords relation based on the foreign keys specified with RelationDescriptor.RelationKeys.
Declaration
public ChildTable GetRelatedChildTable(RelationDescriptor rd)
Parameters
Type | Name | Description |
---|---|---|
RelationDescriptor | rd | The relation descriptor for relation keys. |
Returns
Type | Description |
---|---|
ChildTable | The ChildTable from the related table. |
GetRelatedRecord(RelationDescriptor)
Returns a record from a related table with a RelationKind.ForeignKeyReference relation based on the foreign keys specified with RelationDescriptor.RelationKeys and the values stored in this record's underlying data row.
Declaration
public Record GetRelatedRecord(RelationDescriptor rd)
Parameters
Type | Name | Description |
---|---|---|
RelationDescriptor | rd | The relation descriptor for relation keys. |
Returns
Type | Description |
---|---|
Record | The record from the related table. |
GetRelatedRecord(RelationDescriptor, FieldDescriptor, Object)
Returns a record from a related table with a RelationKind.ForeignKeyReference relation based on the foreign keys specified with RelationDescriptor.RelationKeys. This overload lets you dynamically specify the foreign key value as a parameter.
Declaration
public Record GetRelatedRecord(RelationDescriptor rd, FieldDescriptor foreignKeyField, object foreignKeyValue)
Parameters
Type | Name | Description |
---|---|---|
RelationDescriptor | rd | The relation descriptor for relation keys. |
FieldDescriptor | foreignKeyField | The field descriptor for which a value should be specified manually (and not be retrieved from underlying records data row). |
System.Object | foreignKeyValue | The foreign key value. |
Returns
Type | Description |
---|---|
Record | The record from the related table. |
GetSourceIndex()
Gets the source index of the record. For internal use.
Declaration
public int GetSourceIndex()
Returns
Type | Description |
---|---|
System.Int32 | Returns source index. |
GetSummaries(Table, out Boolean)
Gets summary information for this element and child elements. The summaries are in the same order as the Summaries of the parent table descriptor.
Declaration
public override ITreeTableSummary[] GetSummaries(Table parentTable, out bool summaryChanged)
Parameters
Type | Name | Description |
---|---|---|
Table | parentTable | A reference to the parent table of this element. |
System.Boolean | summaryChanged | Returns True if changes were detected. |
Returns
Type | Description |
---|---|
ITreeTableSummary[] | An array of ITreeTableSummary objects. |
Overrides
GetUniformChildListSourceIndex()
Returns the source index in the current child list if the record belongs to a UniformChildList relation. The index is zero-based for each ChildTable.
Declaration
public int GetUniformChildListSourceIndex()
Returns
Type | Description |
---|---|
System.Int32 | The source index in the current child list. |
GetValue(FieldDescriptor)
Gets the value from the underlying datasource.
Declaration
public virtual object GetValue(FieldDescriptor fieldDescriptor)
Parameters
Type | Name | Description |
---|---|---|
FieldDescriptor | fieldDescriptor | The field to be retrieved. |
Returns
Type | Description |
---|---|
System.Object | Returns value from the underlying datasource. |
GetValue(SortColumnDescriptor)
Gets the value from the underlying data source.
Declaration
public virtual object GetValue(SortColumnDescriptor cd)
Parameters
Type | Name | Description |
---|---|---|
SortColumnDescriptor | cd | The field to be retrieved. |
Returns
Type | Description |
---|---|
System.Object | Returns value from the underlying datasource. |
GetValue(String)
Gets the value from the underlying datasource.
Declaration
public object GetValue(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The field to be retrieved. |
Returns
Type | Description |
---|---|
System.Object | Returns value from the underlying datasource. |
GetVisibleCount()
Gets the number of visible elements in this group.
Declaration
public override int GetVisibleCount()
Returns
Type | Description |
---|---|
System.Int32 | Visible element count. |
Overrides
GetVisibleCustomCount()
Gets the custom count for the visible elements.
Declaration
public override double GetVisibleCustomCount()
Returns
Type | Description |
---|---|
System.Double | Visible custom count. |
Overrides
GetYAmountCount()
Gets the height (e.g. screen pixels) for the element.
Declaration
public override double GetYAmountCount()
Returns
Type | Description |
---|---|
System.Double | Element height. |
Overrides
InvalidateCounter()
Resets the counter.
Declaration
public override void InvalidateCounter()
Overrides
InvalidateCounterBottomUp()
Resets the counter for all elements.
Declaration
public override void InvalidateCounterBottomUp()
Overrides
InvalidateCounterTopDown(Boolean)
Resets the counter for all elements.
Declaration
public override void InvalidateCounterTopDown(bool notifyCounterSource)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | notifyCounterSource | Indicates whether to notify the counter source. |
Overrides
InvalidateSummariesBottomUp()
Resets the summaries for all the elements.
Declaration
public override void InvalidateSummariesBottomUp()
Overrides
InvalidateSummariesTopDown()
Reset the summaries for all the elements.
Declaration
public override void InvalidateSummariesTopDown()
Overrides
InvalidateSummary()
Resets the summary.
Declaration
public override void InvalidateSummary()
Overrides
IsChildVisible(Element)
Determines if the child elements are visible.
Declaration
public override bool IsChildVisible(Element el)
Parameters
Type | Name | Description |
---|---|---|
Element | el | The Element. |
Returns
Type | Description |
---|---|
System.Boolean | True if the child is visible. |
Overrides
IsSelected()
Determines if record is marked as selected.
Declaration
public virtual bool IsSelected()
Returns
Type | Description |
---|---|
System.Boolean | True if selected. |
MeetsFilterCriteria()
Determines if the record meets filter criteria.
Declaration
public virtual bool MeetsFilterCriteria()
Returns
Type | Description |
---|---|
System.Boolean | True if the record meets filter criteria; False otherwise. |
OnBeginEditCalled()
Overrides when BeginEdit() is called.
Declaration
public override bool OnBeginEditCalled()
Returns
Type | Description |
---|---|
System.Boolean | True if BeginEdit() can proceed; False if it should abort. |
Overrides
OnBeginEditComplete(Boolean)
Overrides when BeginEdit() successfully finishes.
Declaration
public override void OnBeginEditComplete(bool success)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | success | True, if it is successfully finished; False, otherwise. |
Overrides
OnCancelEditCalled()
Overrides when CancelEdit() is called.
Declaration
public override bool OnCancelEditCalled()
Returns
Type | Description |
---|---|
System.Boolean | True if CancelEdit() can proceed; False if it should abort. |
Overrides
OnCancelEditComplete(Boolean)
Overrides when CancelEdit() successfully finishes.
Declaration
public override void OnCancelEditComplete(bool success)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | success | True, if it is successfully finished; False, otherwise. |
Overrides
OnElementTreeInvalidateCounterBottomUp()
Called when the counters are reset.
Declaration
public override void OnElementTreeInvalidateCounterBottomUp()
Overrides
OnEndEditCalled()
Overrides when EndEdit() is called.
Declaration
public override bool OnEndEditCalled()
Returns
Type | Description |
---|---|
System.Boolean | True if EndEdit() can proceed; False if it should abort. |
Overrides
OnEndEditComplete(Boolean)
Overrides when EndEdit() successfully finishes.
Declaration
public override void OnEndEditComplete(bool success)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | success | True, if it is successfully finished; 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 OnEnsureInitialized(Object) call. |
Returns
Type | Description |
---|---|
System.Boolean | True if changes were detected and the object was updated; False otherwise. |
Overrides
OnEnterRecordCalled()
Overrides when EnterRecord(Element) is called.
Declaration
public override bool OnEnterRecordCalled()
Returns
Type | Description |
---|---|
System.Boolean | True if EnterRecord(Element) can proceed; False if it should abort. |
Overrides
OnEnterRecordComplete(Boolean)
Overrides when EnterRecord(Element) successfully finishes.
Declaration
public override void OnEnterRecordComplete(bool success)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | success | True, if it is successfully finished; False, otherwise. |
Overrides
OnLeaveRecordCalled()
Overrides when LeaveRecord(Boolean) is called.
Declaration
public override bool OnLeaveRecordCalled()
Returns
Type | Description |
---|---|
System.Boolean | True if LeaveRecord(Boolean) can proceed; False if it should abort. |
Overrides
OnLeaveRecordComplete(Boolean)
Overrides when LeaveRecord(Boolean) successfully finishes.
Declaration
public override void OnLeaveRecordComplete(bool success)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | success | True, if it is successfully finished; False, otherwise. |
Overrides
ReinsertRecord()
Determines the group the record belongs to and inserts it at the correct sort position. The record must have previously been detached from the engine with DetachRecord
Declaration
public Group ReinsertRecord()
Returns
Type | Description |
---|---|
Group | Returns Group. |
ResetValues()
Resets cached values. The method is implemented only in the RecordWithValueCache class. You should follow this call by a call to EnsureValues.
Declaration
public virtual void ResetValues()
SetCurrent()
Makes this record the current record in the parent table.
Declaration
public bool SetCurrent()
Returns
Type | Description |
---|---|
System.Boolean | True if record could be made current record; False if navigating to record failed. |
SetCurrent(String)
Determines whether makes this record the current record in the parent table.
Declaration
public bool SetCurrent(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName |
Returns
Type | Description |
---|---|
System.Boolean | True if record could be made current record; False if navigating to record failed. |
SetExpanded(Boolean, Boolean, Boolean)
Sets the record's expansion state and optionally invalidates counters and optionally raises DisplayElementChanging and DisplayElementChanged events.
Declaration
public void SetExpanded(bool value, bool refreshCounters, bool raiseDisplayElementChangeEvents)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | The new expansion state. |
System.Boolean | refreshCounters | True if counters should be invalidated; False otherwise. |
System.Boolean | raiseDisplayElementChangeEvents | True if DisplayElementChanging and DisplayElementChanged events should be raised; False otherwise. |
SetSelected(Boolean)
Marks record as selected and adds it to the SelectedRecordsCollection.
Declaration
public virtual void SetSelected(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | True if the record should be marked as selected. |
SetSelectedRecursive(Boolean)
Marks record and recursively all child records as selected and adds it to the SelectedRecordsCollection.
Declaration
public virtual void SetSelectedRecursive(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | True if the record should be marked as selected. |
SetSourceIndex(Int32, Int32, Object)
Sets the source index. For internal use.
Declaration
public void SetSourceIndex(int index, int sourceListVersion, object data)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.Int32 | sourceListVersion | |
System.Object | data |
SetValue(FieldDescriptor, Object)
Determines whether saves the value into the underlying data source. If BeginEdit() was called, the value is saved as a pending change in the CurrentRecordPropertyCollection. If the field is an unbound field, a SaveValue event is raised.
Declaration
public virtual void SetValue(FieldDescriptor fieldDescriptor, object value)
Parameters
Type | Name | Description |
---|---|---|
FieldDescriptor | fieldDescriptor | The field to be saved. |
System.Object | value | The new value. |
SetValue(String, Object)
Saves the value into the underlying data source. If BeginEdit() was called, the value is saved as a pending change in the CurrentRecordPropertyCollection. If the field is an unbound field, a SaveValue event is raised.
Declaration
public void SetValue(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The field to be saved. |
System.Object | value | The new value. |
ShouldShowRecordPreviewRows()
Called to determine if preview rows should be visible in DisplayElements.
Declaration
public virtual bool ShouldShowRecordPreviewRows()
Returns
Type | Description |
---|---|
System.Boolean | True if preview rows should be visible in DisplayElements; False otherwise. |
ShouldShowRecordRows()
Called to determines if record rows should be visible in DisplayElements.
Declaration
public virtual bool ShouldShowRecordRows()
Returns
Type | Description |
---|---|
System.Boolean | True if record rows should be visible in DisplayElements; False otherwise. |
SupportsId()
Indicates whether this object can be uniquely identified by its Id.
Declaration
public override bool SupportsId()
Returns
Type | Description |
---|---|
System.Boolean | True if Id is supported. |
Overrides
ToString()
Returns a string holding the record data.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of the record object. |
Overrides
UpdatePrimaryKeys(Boolean, SortColumnDescriptor[], PropertyDescriptor[])
Refreshed the PrimaryKeys collection.
Declaration
public void UpdatePrimaryKeys(bool isSorted, SortColumnDescriptor[] arrayOfColumnDescriptors, PropertyDescriptor[] arrayOfPropertyDescriptor)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isSorted | True it the list is sorted. |
SortColumnDescriptor[] | arrayOfColumnDescriptors | Array of column descriptors. |
System.ComponentModel.PropertyDescriptor[] | arrayOfPropertyDescriptor | Array of property descriptors. |
UpdateSortInfo(Boolean, SortColumnDescriptor[], PropertyDescriptor[])
Refreshed the SortKeys collection.
Declaration
public void UpdateSortInfo(bool isSorted, SortColumnDescriptor[] arrayOfColumnDescriptors, PropertyDescriptor[] arrayOfPropertyDescriptor)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isSorted | True if the list is sorted. |
SortColumnDescriptor[] | arrayOfColumnDescriptors | Array of column descriptors. |
System.ComponentModel.PropertyDescriptor[] | arrayOfPropertyDescriptor | array of property descriptors. |
UpdateValues(IEnumerable)
Enumerates through values in the collection of ChangedFieldInfo objects and updates the old and new values in this record. The method is implemented only in the RecordWithValueCache class.
Declaration
public virtual void UpdateValues(IEnumerable changedFields)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | changedFields | The changed fields. |