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...
No comments:
Post a Comment