Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 24th, 2006, 04:05 AM
Registered User
Join Date: May 2006
Location: Copenhagen, , Denmark.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid renders different on different machines


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:

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:
   <td nowrap="nowrap" align="left" style="font-weight:bold;width:270px;"></td>

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

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

  #2 (permalink)  
Old May 25th, 2006, 10:21 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts

cross post:

Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with the book on two machines... Bruce.Wiki BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 October 30th, 2008 11:53 AM
Insert renders error snufse SQL Language 2 October 13th, 2008 09:28 PM
DataGrid renders different on different machines GertFrost ASP.NET 2.0 Basics 1 June 19th, 2007 03:34 PM
dw renders my css when previewed in browser? jakewilliamson Dreamweaver (all versions) 5 March 21st, 2005 05:42 AM

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