ComponentOne List 8.0 for ActiveX
Adjusting Column Properties in Code

Properties of the Column object can be changed at run time using Visual Basic code. For example, changing the DataField property can be done as follows:

Example Title
Copy Code
With TDBList1.Columns(0)

    .DataField = "New DataField"

    TDBList1.ReBind

    .Caption = "New Caption"

End With

Note that after changing the DataField property, you must ReBind the list columns so that the new data will appear in the column. You should also change the caption to describe the new field.

Other Column object properties can be changed in a similar fashion. Please refer to Column Object Properties for a complete listing.

 

 


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

Product Support Forum  |  Documentation Feedback