Partager via


How to: Add Dynamic Behavior to Data-Bound Controls by Using a DynamicField

This topic describes how you can add ASP.NET Dynamic Data functionality by using the DynamicField field in a GridView or a DetailsView control by using the designer. A DynamicDataManager control must be present on the page in order to add DynamicField objects to the data-bound control using the designer.

To add a dynamic field to a GridView or DetailsView control

  1. In Design view, right-click the GridView or DetailsView control and then click Show Smart Tag.

  2. In the smart tag panel, click Edit Columns for the GridView control or Edit Fields for the DetailsView control.

    The Fields window is displayed.

  3. Uncheck Auto-generate fields.

  4. In the Available fields list, select DynamicField and then click Add.

  5. Set the DataField property to the name of the data column that you want to bind the dynamic field to.

    Repeat steps 4 and 5 for each data field that you want to display.

See Also

Concepts

ASP.NET Dynamic Data Overview

Change History

Date

History

Reason

July 2008

Added topic for new feature.

SP1 feature change.