Showing posts with label DataControlRowType. Show all posts
Showing posts with label DataControlRowType. Show all posts

Tuesday, May 15, 2012

GridView RowType

Different types of rows exist in the GidView.

"GridViewRow.RowType Property (System.Web.UI.WebControls)" ( http://bit.ly/h4fyeP )

Here's a kitteh to relax you...


Monday, April 25, 2011

GridView DataControlRowType

"DataControlRowType Enumeration (System.Web.UI.WebControls)" ( http://bit.ly/fA1sJ6 )

There are several different row types in a Gridview, each with its own function. When using an event such as RowDataBound (where individual rows are of interest to us), it is important to check for the DataControlRowType.

  • Header
  • Footer
  • DataRow
  • Separator
  • Pager
  • EmptyDataRow     

We can do so. The following example checks for a DataRow (a normal row of data):

If e.Row.RowType = DataControlRowType.DataRow Then

    ' Code...

End If