p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   DataGrid renders different on different machines (http://p2p.wrox.com/showthread.php?t=42939)

GertFrost May 24th, 2006 04:05 AM

DataGrid renders different on different machines
 
Hi

I'm working on a .NET application and has run into an annoying problem.

I have a report, that consists of a DataGrid, wher I have disabled the AutoGenerateColumns, as I'm binding the columns myself.

I have turned on nowrap on "Header" and "Item", and is explicit setting width (bcol.ItemStyle.Width = Unit.Pixel(270); )

the problem is, that on my own machine and the "production"-server, the HTML renders differently, so the "<table>" does not respect the width I have set.

This is the data for the 2 machines:

mine:
XP Professional version 2002 sp2
MSIE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
ASP .Net (v2.0.50727).

the other:
XP Professional version 2002 sp2
MSIE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
ASP .Net (v2.0.50727).

regardless of the "identicality" of the two machines, the resulting HTML is as follows:

my machine:
...
<table>
<tr>
   <td nowrap="nowrap" align="left" style="font-weight:bold;width:270px;"></td>
</tr>
</table>
...

and the other:
...
<table>
<tr>
   <td align="left" style="font-weight:bold;width:270px;white-space:nowrap;"></td>
</tr>
</table>
...

Note, that the "nowrap" is different. As far as I can tell, the style-attribute on the "other" machine is invalidating the <td>-tag, and thus the table does not respect the "width"-setting.

Can anyone explain why this is? Where is the difference between the two machines? And even better - how can I get the other machine to render the HTML like my own machine?

Thanks in advance


jbenson001 May 25th, 2006 10:21 PM

cross post:
http://p2p.wrox.com/topic.asp?TOPIC_ID=44664



All times are GMT -4. The time now is 06:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.