True DataControl 8.0 Reference > True DataControl Control > TData Control Properties > Array Property |
Array Property
Specifies an XArrayDB object as the control's data source.
TData.Array= XarrayDB
Read/Write at run time. Not available at design time. Property applies to TData control and TDataLite control.
The Array property specifies an ComponentOne XArrayDB object that acts as a data source. This property is used only when DataMode is set to 1 - MemoryArray. It has no effect in the other two data modes.
You do not need to set the Array property explicitly in code. In memory array mode, TData control automatically creates an XArrayDB object containing one row of empty data, with one column for each field. You can redimension and populate the array returned by the Array property in the OpenData event.
You can also create, re-dimension, and populate an XArrayDB object in code, then assign it to the Array property of a TData control in the OpenData event. If you create a new XArrayDB object, it is your responsibility to make its ColumnCount equal to the number of data fields in the TData control.
Setting the Array property to an XArrayDB object outside the OpenData event causes a refresh of the TData control. You are not allowed to set the Array property in True DataControl events other than OpenData.
For more information, see Memory Array Mode.
See Also