DataControlField class






The DataControlField class serves as the base class for all data control field types. Data control fields are used by data-bound controls to represent a field of data, similar to how a DataGridColumn object represents a type of column in the DataGrid control.

Use the classes that are derived from DataControlField to control how a field of data is displayed in a data-bound control such asDetailsView or GridView. The following table lists the different data control field types provided by ASP.NET.


You can also extend the DataControlField and BoundField classes to create your own data control field types.

The DataControlField class provides many properties that determine how user interface (UI) elements are presented in the data-bound control. Not every control uses every available data control field property when rendering a UI. For example, the DetailsView control, which displays the data control fields as rows, includes a header item for each data control field, but no footer item. Therefore, the FooterText andFooterStyle properties are ignored by the DetailsView control. The GridView control, however, uses the FooterText and FooterStyle properties if the ShowFooter property is set to true. Similarly, the data control field properties affect the presentation of UI elements depending on what the element is. The ItemStyle property is always applied to the field. If the type derived from DataControlField contains a control, as in the ButtonField or CheckBoxField classes, the ControlStyle property is applied to the field.


0 Responses to “DataControlField class”

Post a Comment

Labels

Topics