Displaying Data on a Form

This section outlines the basic procedure for connecting controls on a Flow Designer form to data sets for viewing, editing and collecting when the required components have been added to the form - see Working with Data.

With the required data controls added to your form, the following procedure can be used to display data from a data set table in a data grid.

  • Configure the Connection

  • A connection to an application, server or site is required to access a data source. The connection process is outlined in Connection. When a connection has been made, to a source other than Geobank, the ConnectionString property will be populated.

  • Connect the Table

    The connection that has been configured for the purpose must be associated with the Table instance for the data. To do this, select the Table control and set the Connection property in the Properties pane.

    The DataSet must also be set for the Table control, using the DataSet property from the SQL section of the Properties pane.

    Once the Connection and DataSet properties are configured, the Table can be selected for the Table. To do this, from the Data section of the Properties pane, click the ellipsis in the TableName field. The Select Table dialog is opened with a list of the available tables for your Connection displayed.

    The available tables from the data set are listed in the Select Table dialog in a tree format. You can collapse and expand the prefix labels for the tables - for example dbo, GB etc.

    If you enter search text in the field provided, the tables displayed in the Select Table dialog will be filtered, with your search term highlighted.

    The Find button will perform the search again.

    From the dialog, select the table you want to display in your form and click OK. The selected table will be listed in the TableName field.

    Importantly, set the Active property in the SQL section to True. This ensures that the data from the table is available to the BindingSource.

  • Connect the BindingSource

    The BindingSource instance created for the data display must be associated with the correct data source. To do this, with the BindingSource selected, set the DataSource property in the Properties pane.

    Next, select Table from the DataMember property.

  • Connect the DataGridView

    With the Table instance configured, you can set the Data Source for the DataGridView on your form to display the data from your selected table. Use the control properties to select the BindingSource instance for the grid.

    Provided that the table has been selected for the Table instance, and it is set to Active, the data from your table will appear in the DataGridView in the form.

    To modify the columns of data that are displayed in the grid, use the control properties to select Edit Columns.... The Edit Columns dialog opens.

    You can use the options in the dialog to Add, Remove and reorder the position of columns in your DataGridView. When the data is configured as required, click OK to return to the form.

    If you run the Start Debugging process from the Debug menu in Flow Designer, a preview of the form will be displayed.

For information on using the Data Explorer to create and contain controls and labels, see Using the Data Explorer.

Using the Data Explorer

Working with Data