GridView1.HeaderRow.ForeColor = Drawing.Color.White GridView1.HeaderRow.BackColor = Drawing.Color.FromArgb(75, 130, 201) GridView1.HeaderStyle.Font.Underline = True GridView1.HeaderRow.Style.Add("text-decoration", "Underline") For Each cell As TableCell In GridView1.HeaderRow.Cells cell.BackColor = GridView1.HeaderStyle.BackColor cell.ForeColor = GridView1.HeaderStyle.ForeColor GridView1.HeaderStyle.Font.Underline = True GridView1.HeaderRow.Cells(0).Style.Add("text-decoration", "Underline") Next For Each row As GridViewRow In GridView1.Rows For Each cell As TableCell In row.Cells If row.RowIndex Mod 2 = 0 Then row.BackColor = Drawing.Color.FromArgb(235, 235, 235) cell.BackColor = GridView1.AlternatingRowStyle.BackColor Else row.BackColor = Drawing.Color.FromArgb(211, 211, 211) cell.BackColor = GridView1.RowStyle.BackColor End If cell.CssClass = "textmode" Next Next GridView1.RenderControl(hw) Dim style As String = "<style> .textmode { } </style>" Response.Write(style) Response.Output.Write(sw.ToString()) Response.Flush() Response.[End]()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)