SUMMARY
When a database field being edited is a foreign key field then all the rows from
the parent table are displayed. The user chooses one of the parent rows and its
value is saved as a value for the field being edited. By default the parent
table rows are represented by the value of the first text column in the parent
table. The article explains how to customize the display text for the FK values.
MORE INFORMATION
Lets consider a simple example. The Products database table has a column CategoryID,
which is a foreign key to the CategoryID column of the Categories database table.
Categories table has the following columns: CategoryID, CategoryName, Description,
Picture .In the default case the user interface will display a list of the
CategoryName values for the rows in the Categoies table.
To change the display text for the values you should specify a
RowCaption Expression
for the Categories table. The expression can contain column names from the columns
of the FK parent table. In our case this will be the columns of the Categories table.
An appropriate expression is "
CategoryName+'( '+Description +' )'".
The syntax of the expression is described here -
MSDN - DataColumn.Expression Property.
There are two places where you can specify the RowCaption Expression. Either in a Global
ASP.NET resource or in the database table's extended properties.
Global ASP.NET resource
Open the .resx file which is specified in the smartDBforms.NET/resourceClassKey
attribute in Web.config. Enter a new value. The name of the value should be like
<TableName>.RowCaptionExpression. In our case this will be "Categories.RowCaptionExpression" .
The value will be "CategoryName+'( '+Description +' )'".

Database extended property
Open MS SQL Management Studio, find the table and right-click on it. Select the Properties
menu item. In the Table Properties dialog select the Extended
Properties page. Enter a new value. The name of the value should be
SDBF_RowCaptionExpression.
CONCLUSION
After the change is applied the user interface for the CategoryID field will look like this:

You can find more information about smartDBforms.NET Caption and Description configuration
in the
online documentation.