DataField

[property icon] DataField

Specifies the column name that is to be bound to the control

Integer SYM index property

Applies to: Button , Grid , GridCell , GroupBox , KCMLEdit , Picture Button , Static Text


[property icon] DataField$

Specifies the column name that is to be bound to the control

String property

Applies to: Button , Grid , GridCell , GroupBox , KCMLEdit , Picture Button , Static Text

Introduced in KCML version 6.10


>DataField

DataField

The DataField$ property of a data aware control specifies the name of the field bound to a control. It is different from the now deprecated DataField integer property which refers to symbol indices and is usually set at design time.

This field will normally be set in the forms editor by dragging from the table list onto the control but it can also be set programmatically.

.txtDesc.DataField$ = "Name"

This property was introduced in KCML 6.10 to allow the programmer to inspect or change the binding of a control to a field in a record buffer. It replaces the obsolete technique of setting the DataField indexed property using SYM as this mechanism will not be supported in future versions of KCML. This property also replaces the experimental SetDataField() method which was withdrawn in KCML 6.11.

The DataBind property must be set at design time to specify the name of the row buffer DEFRECORD variable that has been bound to the database table. The DataField$ name must exist as a FLD name in the bound row buffer record.

See here for more on data binding.

See also

Button methods, properties and events. Grid methods, properties and events. GridCell methods, properties and events. GroupBox methods, properties and events. KCMLEdit methods, properties and events. Picture Button methods, properties and events. Static Text methods, properties and events.