System.Web.UI.WebControls.DataControlRowType Enumeration

Specifies the function of a row in a data control, such as a System.Web.UI.WebControls.DetailsView or System.Web.UI.WebControls.GridView control.


public enum DataControlRowType


The System.Web.UI.WebControls.DataControlRowType enumeration identifies the function of rows in a data control. It is used by the System.Web.UI.WebControls.DetailsView and System.Web.UI.WebControls.GridView controls to distinguish between rows that display data and rows that display other user interface (UI) elements, such as a header row, row separator, or pager buttons.

You can use the System.Web.UI.WebControls.DataControlRowType enumeration to identify the type of a System.Web.UI.WebControls.GridViewRow or System.Web.UI.WebControls.DetailsViewRow object when you enumerate through a System.Web.UI.WebControls.GridViewRowCollection or System.Web.UI.WebControls.DetailsViewRowCollection collection. If you are writing a data control that creates rows, you can use the System.Web.UI.WebControls.DataControlRowType enumeration to identify the function of different rows in the control.


Member NameDescription

A data row of a data control. Only DataControlRowType.DataRow rows can be data-bound.


The empty row of a data-bound control. The empty row is displayed when the data-bound control has no records to display and the EmptyDataTemplate template is not null.


A footer row of a data control. Footer rows cannot be data-bound.


A header row of a data control. Header rows cannot be data-bound.


A row that displays pager buttons or a pager control. Pager rows cannot be data-bound.


A row separator. Row separators cannot be data-bound.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0