DataGrid - BorderStyle="None" and BorderWidth="None" doesn't work for Firefox

D

David Freeman

Hi There!

I'm using ASP.NET 1.1 and VB.

Below is my DataGrid declaration...

<asp:DataGrid
id="myDataGrid"
runat="server"
AutoGenerateColumns="false"
OnItemCreated="myDataGrid_ItemCreated"
Style="width:100%;border:0px;background-color:transparent;"
cellspacing="0"
cellpadding="0"
BorderWidth="0px">

It worked in MSIE 6 but it doesn't work for Firefox: black lines for rows
and columns are drawn!! I've investigated the responsed HTML code and below
is what I've discovered...

<table cellspacing="0" cellpadding="5" rules="all" border="0"
id="WebControl1_myDataGrid"
style="width:100%;border:0px;background-color:transparent;">

So rules="all" is causing the FireFox to draw these lines.

How do I disable it???

David
 
G

Guest

the problem i guess david is that Datagrid creates (grid) with HTML
Is it possible to use another control apart from DAtagrid?
Or maybe use javascript to check for the browsersfirst before rendering ur
pages
 
D

David Freeman

Hi Patrick!

Thanks for the reply! Yea I don't know what I did wrong, before it was OK on
Firefox AND MSIE. And Firefox suddenly starts showing these lines on the
grid. And when I inspected the HTML output code, I found that rules="all"
attribute.

Anyway, I guess I might have to use client-side JavaScript to change the
rules attribute at client side. But I'm sure there should be a way to turn
this off from server side. Hopefully I can find out.

Wish me luck!
David
 
G

Guest

David..
Did u find a solution for that?



David Freeman said:
Hi Patrick!

Thanks for the reply! Yea I don't know what I did wrong, before it was OK on
Firefox AND MSIE. And Firefox suddenly starts showing these lines on the
grid. And when I inspected the HTML output code, I found that rules="all"
attribute.

Anyway, I guess I might have to use client-side JavaScript to change the
rules attribute at client side. But I'm sure there should be a way to turn
this off from server side. Hopefully I can find out.

Wish me luck!
David
 
N

Nay Myo Aung

Hey guys,

As for me, I do not have the "proper solution" from the server side BUT
here's the CSS hack that will fix the problem...

Put "border-collapse: separate;" in the Style attribute of the DataGrid.

Don't ask me how, it just works :) (Hence, it is a hack). I hope we can find
the "proper" one later on.

--
Nay Myo Aung
Chief Visual Software Architect
MCP MCSD MCDBA

Email: owN0SPAMner @naymyoauN0SPAMng.name [remove NOSPAM s]
Homepages:
http://www.naymyoaung.name
http://hyperdisc.unitec.ac.nz/postgrad/aungn01/
 
Joined
Feb 16, 2011
Messages
1
Reaction score
0
just set a css class to the rowClasses or columnClasses attributes

and add .dataGridBorder { border:0px; } in the css file
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top