Dreamweaver

Display the results in a DataGrid (ASP.NET)

After creating a DataSet to hold the search results, you can use a DataGrid to display the information on the page.

  1. On the search page, place the insertion point where you want the DataGrid to appear.
  2. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select DataGrid.

    The DataGrid dialog box appears.

  3. In the ID box, enter a name for the DataGrid such as dgLocation.
  4. In the DataSet pop‑up menu, select the DataSet you defined to hold the search results.
  5. Complete the rest of the dialog box as desired.

    The following example shows a DataGrid dialog box that creates a DataGrid with three columns and ten rows, and links to previous and next pages of results:

    A DataGrid dialog box that creates a DataGrid with three columns and ten rows, and links to previous and next pages of results.

    The DataGrid appears the first time the search page loads even if the user hasn’t conducted a search yet. You can hide the DataGrid when the page loads the first time.