ComponentOne True DataControl 8.0
Tutorial 3 - Using TDataLite with Memory Data

In this tutorial you will learn how to use TDataLite with memory array data.

  1. Start a new project.

  2. Place the following controls on the form (Form1) as shown in the figure: a TDataLite control (TDataLite1) and a DataGrid control (DataGrid1). This time, we do not need an ADODC control as TDataLite’s data source, we will use a memory array as the data source.

  3. Set properties as follows:

    Example Title
    Copy Code
    TDataLite1.DataMode  1 - MemoryArray
    
    DataGrid1.DataSource TDataLite1
    
  4. Open the TDataLite property pages dialog by clicking the right mouse button over TdataLite1 and selecting TDataLite Properties. Select the Fields property page. Since there are no predefined fields in memory array mode, you must define the fields yourself, specifying the array structure. Click the right mouse button over the fields list area, and select New Field from the menu (alternatively, you can press the New button). A new field with the default name FIELD_0 appears. Change the name to A by typing it in the Name text box. Select 2 - Integer in the Data Type combo box. Then create two more fields, B and C. Repeat the steps above, but specify different data types: Date for B andCurrency for C. Press the OK button to close the dialog and save changes.

Run the Program and Observe the Following:

Close the program. Congratulations, you have successfully completed Tutorial 3!

 

 


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

Product Support Forum  |  Documentation Feedback