Class RecordWithValueCache
Implements the record that shadows values in table and can gives hints which values were changed in ListChanged event. The new GetOldValue method also gives access to the previous value before a change and can be used for calculating the difference between two values.
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class RecordWithValueCache : Record, IDisposable, IDisposedEvent, IIsDisposedProperty, ITreeTableCounterSource, ITreeTableSummaryArraySource, IContainerElement, IElementTreeTableSource, IElement, IComparable, ICloneable
Constructors
RecordWithValueCache(Table)
Initializes the new instance of the RecordWithValueCache class.
Declaration
public RecordWithValueCache(Table parentTable)
Parameters
Type | Name | Description |
---|---|---|
Table | parentTable | Parent table. |
Methods
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 override ChangedFieldInfoCollection CompareAndUpdateValues()
Returns
Type | Description |
---|---|
ChangedFieldInfoCollection | The collection with detected changes. |
Overrides
EnsureValues()
Ensures that record values are cached. The method is implemented only in the RecordWithValueCache class.
Declaration
public override void EnsureValues()
Overrides
GetOldValue(Int32)
Returns the old value for a record.
Declaration
public override object GetOldValue(int fieldIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldIndex | Field index. |
Returns
Type | Description |
---|---|
System.Object | Old value of the record. |
Overrides
GetValue(FieldDescriptor)
Gets the value from the underlying datasource.
Declaration
public override object GetValue(FieldDescriptor fieldDescriptor)
Parameters
Type | Name | Description |
---|---|---|
FieldDescriptor | fieldDescriptor | The field to be retrieved. |
Returns
Type | Description |
---|---|
System.Object | Returns Value. |
Overrides
ResetValues()
Resets cached values.
Declaration
public override void ResetValues()
Overrides
UpdateValues(IEnumerable)
Enumerates through values in the collection of ChangedFieldInfo objects and updates the old and new values in this record.
Declaration
public override void UpdateValues(IEnumerable changedFields)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | changedFields | The changed fields. |