Protected Sub GrdCatalogo_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GrdCatalogo.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
if condizione=true then
Dim lbCategoria As Label = New Label
lbCategoria.Text = "Dicitura"
Dim row As GridViewRow = New GridViewRow(e.Row.RowIndex, e.Row.RowIndex, DataControlRowType.DataRow, DataControlRowState.Normal) 'DataControlRowState.Normal ... e.Row.RowState
Dim cell As TableCell = New TableCell()
cell.BackColor = Color.FromArgb(11, 158, 25)
cell.ColumnSpan = 9
cell.Text = lbCategoria.Text
row.Cells.Add(cell)
CType(e.Row.Parent, Table).Rows.Add(row)
end if
end if
end sub