Thursday, February 19, 2009

GridLines style in Gridview

A fast way to change the style of the gridlines in a gridview:

Protected Sub gwMyGw_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles gwMyGw.PreRender

'PreRender event!
Dim tblStyle As New TableItemStyle()
tblStyle.BorderColor = Drawing.Color.White
tblStyle.BorderWidth = "2"

Dim row As TableRow
For Each row In Me.gwMyGw.Rows
Dim cel As TableCell
For Each cel In row.Cells

End Sub

Enjoy !


Anonymous said...

Very useful! Thanks!

Vladimir said...

Nice trick. I did something similar for one project.

2012 | aspnet code by Michele | don't try this at home
Mirko Iodice Notageek
Vladimir Carrer Carrer web log