Datagrid border color

R

Rick

after migrating from VS 2003 to VS 2005, I noticed that all of our datagrids
had the cell borders set to white, they were blue before the conversion. If
you set the border color in 2003, the cell borders would change color, in
2005 the cell borders do not change colors.

Has this changed for some reason?

Thanks in advance!
Rick
 
W

Walter Wang [MSFT]

Hi Rick,

I cannot reproduce the issue on my side. Here's my test steps:

1) Create a VS2003 web application, add a DataGrid to the WebForm and bind
to some data; change the bordercolor.
2) Use VS2005 to open the Vs2003 solution to begin the migration wizard,
after migrated, I run the VS2005 web application and it still works
correctly to show the previously configured bordercolor. If I select 'View
Source' in IE, I can see the generated HTML <table> has 'bordercolor=...'
attribute.

Would you please do this in a smaller web application project and verify if
it can reproduce the issue on your side? Also, could you please post some
related code here, such as the DataGrid markup in ASPX, and the generated
HTML; both for the VS2003 and VS2005 version? Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rick

Looks like it may be something on the web server I pushed to. My local
machine doesn't have this problem. But the development web server I
published the web site to, does have this issue.I am running a 2003
Framework 1.1 web site on the same machine and it works.

Any ideas on where I should look to resolve it on the web server? Is there a
config file settting or assembly that controls the border color on a
datagrid?
 
R

Rick

I should point out, the web server is a Windows Server 2003 and my local pc
is XP.

Rick said:
Looks like it may be something on the web server I pushed to. My local
machine doesn't have this problem. But the development web server I
published the web site to, does have this issue.I am running a 2003
Framework 1.1 web site on the same machine and it works.

Any ideas on where I should look to resolve it on the web server? Is there
a config file settting or assembly that controls the border color on a
datagrid?

"Walter Wang [MSFT]" said:
Hi Rick,

I cannot reproduce the issue on my side. Here's my test steps:

1) Create a VS2003 web application, add a DataGrid to the WebForm and
bind
to some data; change the bordercolor.
2) Use VS2005 to open the Vs2003 solution to begin the migration wizard,
after migrated, I run the VS2005 web application and it still works
correctly to show the previously configured bordercolor. If I select
'View
Source' in IE, I can see the generated HTML <table> has 'bordercolor=...'
attribute.

Would you please do this in a smaller web application project and verify
if
it can reproduce the issue on your side? Also, could you please post some
related code here, such as the DataGrid markup in ASPX, and the generated
HTML; both for the VS2003 and VS2005 version? Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.
 
W

Walter Wang [MSFT]

Hi Rick,

Let me first summarize the information so far:

* The same website is deployed to a 2003 server and a XP
* You used *same* browser to visit both of them, and 2003 is not showing
the correct border color

Please try to use IE to save the webpage as static html files (use the type
"Webpage, complete", this will save other linked css/javascript/image
files) from both 2003 and xp. Try to see if there're any difference that
will impact the display. If in doubt, zip them and send to me. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi Rick,

Thanks very much for your sample files. I've looked into the code and found
the root cause: The generated HTML in 1.1 puts the bordercolor attribute in
both the table
definition and the style tag. The generated HTML in 2.0 only puts the
border-color attribute in the style tag - and IE7 does not honor this
attribute.

Normally, when we migrate a 1.1 web application to 2.0, we might need
temporarily to add <xhtmlConformance mode="Legacy"> in web.config (under
<system.web>) to make it render like 1.1. However, this does have some
issues to watch out:

#Gotcha: Don't use <xhtmlConformance mode="Legacy"/> with ASP.NET AJAX -
ScottGu's Blog
http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconf
ormance-mode-legacy-with-asp-net-ajax.aspx

Since ScottGu also mentioned that this is not recommended, I would suggest
to use following workaround to fix this specific issue in the DataGrid: in
your code behind, whenever the DataGrid is rebound, add following code:

grid1.Attributes.Add("BorderColor", "Blue");

Hope this helps.




Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top