ASP.NET Futures (2007): DynamicDetails Control
This section provides information about the following:
DynamicDetails control. This control is one of a set of dynamic data
controls that obtain schema information at run time, provide default display formats
according to common user expectations, and enable you to easily customize those
formats.
The DynamicDetails control displays one record of the current table
or view, using a DetailsView control. By default, all the fields in
the table or view are displayed.
<asp:DynamicDetails runat="server" />
This control has the following properties:
ControlID. Specifies the name of a DetailsView control.
The DynamicDetails control uses the specified control to display the
details of the selected row, instead of creating a DetailsView control
with default settings. This enables you to customize the appearance of the DynamicDetails
control.
EnableDelete. If true, the DynamicDetails control
supports deleting rows, and shows a Delete link. The default
is true.
EnableUpdate. If true, the DynamicDetails control
supports updating rows, and shows an Update link. The default
is true.
Customizing Control Behavior
To control what columns are displayed, and in what order, provide a GetDetailColumns
method for the page. GetDetailColumns takes no arguments and returns
an IEnumerable list of column names. For dynamic languages, this has
the effect of overriding the GetDetailColumns method of the base class
for the page. For statically compiled languages, the GetDetailColumns
method must explicitly override the base class method.
See Also
Introduction: Dynamic Data Controls for ASP.NET
|