Data is consistent if it does not contain contradictions. Therefore data is consistent if data displayed is equal to data stored in its data source.
To ensure consistency of data in a data source, consistency key must be defined. According to this consistency key system compares consistency timestamp of displayed field to a consistency timestamp of a field in a data source. If timestamps differs warning is displayed to the user, through grid notification, informing the user about the data inconsistency. User can than decide what to do. User can than reload data, lock record, reject changes etc.
Defining properties appropriately it is possible to specify the manner in which consistency will be checked and the action executed if the inconsistency is determined.
Developer can define the behaviour of the data source after inconsistency is determined. It is possible to refresh data or to only check them. Furthermore it is possible to define the action for every type of inconsistency. With properties Added, Changed and Missing it is possible to define what to do if a new record is added, a record is changed or a record is deleted.
Options that can be selected for these properties are None, Lock and Override.
- If None is selected nothing is done. Valid data will appear next time the user refreshes data. This can be done manually by clicking Refresh button in navigation toolbar.
- If Lock is selected the record that is changed or missing will be locked for editing until data is refreshed. This can be done manually by clicking Refresh button in navigation toolbar.
- If Override is selected record that is changed is updated, new record is added and deleted record is removed from the list. This is done automatically without user’s interference.
Developer can also define which record remains selected after a new record is added or a record is removed. This is defined with property PositionRetain.
- If KeyField value is selected the same record remains selected. In this case a primary key field must have its property Key set to True.
- If Position value is selected the selected record will be the one in the same position as prior to refresh.
An interval for consistency checking can be defined with property Interval. The value defines the number of milliseconds.
See Implementing Consistency chapter for the step by step instruction how to implement a consistency feature.
MxAdapter
Implementing Consistency