Displaying a Record Description in the Form Title

If you want to display a description of the current record in the form title, do the following:

  1. Select the form in design mode, go to the Visual Studio Properties Window and set the form's AddDescToFormTitle property to True.

  2. In the constructor of your form, set the DataGridView that is bound to your primary business object as the form's Navigation Control (see Adding a Navigation ToolStrip to your Forms for details).

    For example, in C#:

    this.NavControl = this.grdOrders;

    And in VB .NET:

    Me.NavControl = this.grdOrders

  3. Make sure you set the DescriptionField (or DescriptionFields) property of the form's primary business object is set since the description displayed in the form title is pulled from these fields.

    Use the DescriptionField property to specify a single field for the business object's description.

    For example, in C#:

    this.DescriptionField = "FullName";

    And in VB .NET:

    Me.DescriptionField = "FullName"

    Use the DescriptionFields property to specify multiple fields for the business object's description.

    For example, in C#:

    this.DescriptionFields = new string[] {"FirstName","LastName"};

    And in VB .NET:

    Me.DescriptionFields = New String() {"FirstName", "LastName"}


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 07/31/07
Comment or report problem with topic