System.Web.UI.WebControls Namespace GridViewRow Class
.NET Framework version 2.0
Returns the type of a row in a GridView control.
Script |
[ DataControlRowType variable = ] GridViewRow.RowType |
The property is read only with no default value.
Use the RowType property to determine the type of a GridViewRow in a GridView control.
The following example demonstrates how to use the RowType property to determine the type of a row in a GridView control. The order in which the rows are positioned in the GridView is displayed along with the row type.
foreach ( GridViewRow row in myGrid.Rows ) {
msg.Text += "<br>" + row.RowIndex + " " + row.RowType;
}
dim row as GridViewRow
for each row in myGrid.Rows
msg.Text &= "<br>" & row.RowIndex & " " & row.RowType
next |
|
C# |
VB |
GridViewRow Members RowIndex