ComponentOne True DataControl 8.0
Retrieving and Storing Values in the Data Source

Two events, DataRead and DataWrite allow the developer to specify field value transformations on retrieve and save.

Two special properties determine whether to trigger the corresponding event, CallDataRead for DataRead, and CallDataWrite for DataWrite. They are both False by default, meaning neither DataRead nor DataWrite occur. Firing the events, especially DataRead, when they are not actually used can be an unnecessary burden for performance. If you intend to use these events, set corresponding property to True.

DataRead event allows the developer to modify field values when they are retrieved from the data source. It can be used for formatting and other similar purposes. If you modify the value of a field in DataRead, TData will treat that value as if it were read from the data source.

DataWrite event allows the developer to modify field values before they are stored in the data source. It can be used for different purposes including

It is important to understand that changes made in DataWrite are not reflected in TData fields and expressions. They are only applied to the values written to the data source, they do not persist in TData control in any way.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback