ComponentOne True DataControl 8.0
True DataControl Fields

Field variables constitute an individual record in the True DataControl Recordset. Therefore, their values depend upon the current record position within the recordset. Fields defined in the Fields collection at design time or run time from a Fields collection exposed by the True DataControl Recordset property. True DataControl fields define the data structure provided by the TData control; they are exposed to all data-aware controls bound to it. Therefore, it is mandatory for every functional TData control to contain some fields.

Each True DataControl field is represented by a Field object, which is an item in the Fields collection. The Fields collection is specified at design time in the Fields property page, and accessed via the Fields property in code at run time. You are also allowed to modify the Fields collection in code, either outside True DataControl events, or in the WillOpenData event. Every modification made to the Fields collection or its individual Field items in code outside of True DataControl events will cause the TData control to refresh its recordset. Use the ChangeInProgress property if you want to make multiple changes to fields and refresh only once, when all changes are done.

By default, True DataControl exposes all fields so that bound controls can display and modify their values. However, you can hide individual fields from bound controls by setting their Visible property to False. This prevents these fields from appearing in the Recordset, although you can still use them internally for other purposes. For example, a hidden date field representing the modification time for a record can be updated automatically by True DataControl.

See Also

 

 


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

Product Support Forum  |  Documentation Feedback