Wednesday, October 8, 2008

Why does GridView ALWAYS emit style="border-collapse: collapse;"?

Ken Cox, Microsoft MVP says "It's incorrectly hardcoded in ASP.NET in some places."

The GridView also has a border="1".

The solution is to set the GridLines Property of the GridView to "None", which sets the border="0" and set the CellSpacing="-1".

No comments: