smartDBforms.NET API Reference

FieldSchema.Caption Property

The label caption text for this field. The caption can be specified directly or with an caption resource id.

[Visual Basic]
Public ReadOnly Property Caption As String
[C#]
public String Caption {get;}

Remarks

There are several ways in which you can specify the caption.

The first is by directly entering the caption value in the database column's extended properties. You create an extended property with name "SDBF_Caption" and set the value to be the caption. Later during databind this value will be available in the Caption property.

The other way is to use localization. If an localization file was specified in the ResourceClassKey configuration property, an automatic resource id is constructed for the datacolumn name and its value is read from the resource file. The constructed resource id has the following form: {BaseTableName}.{BaseColumnName}.Caption. For example for the table Products and the column ProductName the resource id will be Products.ProductName.Caption
If BaseTableName is empty then the column is considered anonymous. In this case the auto resource id has different format - Anonymous.{ColumnName}.Caption

You can override the default resource id by specifying it directly in the extended properties of the database column. The extended property name is "SDBF_CaptionResID".

You can override the caption and caption resource id in runtime by handling the following event ColumnInfo.

See Also

FieldSchema Class | Adillis.SmartDBForms Namespace | ColumnInfo | ResourceClassKey