I just can’t get over this!! Whilst working on a VS2005 C# project at work to create a web interface for one of my employers systems I encountered something I just couldn’t believe. As part of the design aspx file VS2005 provides for outputting A GridView with a property of [RowStyle-Wrap=”false”] which basically tells the GridView to only have one line of text in any table cell on output.

Basically a GridView is rendered to an HTML Table at runtime on the client-side browser. Anyway, adding the [RowStyle-Wrap=”false”] property renders this [white-space:nowrap;] in the style declaration of each table row. The kicker is that … IE ignores this white space CSS tag and wraps the row anyway. Unbelievable. I’m testing this interface in both IE and Firefox … Firefox responded as expected and put the whole row on one line in the scollable panel.

In order to get the same effect in IE (and present the user with something half useable) I’ve more or less had to break the HTML table by adding in an event like:

foreach (TableCell cell in e.Row.Cells)
if (cell.Text.Length > 0)
cell.Text = “<nobr>” + cell.Text + “</nobr>”;

This is just laughable, utterly laughable. Microsoft web development software formatting web pages that IE can’t render properly. Go Microsoft!!

Web Development Tools
Connection Strings Tip

Leave a Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.