asp.net.ph

GridViewRow.RowType Property

System.Web.UI.WebControls Namespace   GridViewRow Class


.NET Framework version 2.0

Returns the type of a row in a GridView control.

Syntax


Script [ DataControlRowType variable = ] GridViewRow.RowType

Property Value


variable One of the DataControlRowType enum values.

The property is read only with no default value.

Remarks

Use the RowType property to determine the type of a GridViewRow in a GridView control.

Example

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;
}
  C# VB
Determining GridViewRow RowIndex and RowType
Run Sample | View Source
See Also

GridViewRow Members   RowIndex Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph