Dreamweaver

Design a custom layout for a free-form DataGrid column

When creating or editing a DataGrid, use the Free Form option (called a template column in ASP.NET) to create combinations of HTML text and server controls to design a custom layout for a column. The controls within a free-form column can be data-bound. Free-form columns give you great flexibility in defining the layout and functionality of the grid contents, because you have complete control over how the data is displayed and what happens when users interact with rows in the grid.

  1. In the DataGrid dialog box, select the Free Form column in the Columns box.
  2. In the Free Form dialog box, enter a title for the grid’s header or footer rows. (Displaying a header or footer row for a DataGrid is controlled by the DataGrid Property inspector.)
  3. Select a template to use with the Free Form DataGrid from the Template pop‑up menu.
  4. Click the Add Data Field button, select a DataSet column to populate the grid column, and click OK.

    An appropriate data-binding expression is displayed in the Contents box.

  5. Format the Free Form column by enclosing the binding expression with HTML tags in the Contents box.
  6. From the Submit As pop-up menu, select a data type, and click OK.