Using DataGrid, how to suppress the drawing of lines ?

P

peshrad

Hi !

I'm using ASP.NET 1.1 and C# .



For Microsoft Internet Explorer 6.0,
the following code suppresses the drawing of horizontal and vertical lines
in the web page:

DataGrid dg = new DataGrid();
....
dg.BorderStyle = BorderStyle.None;
dg.BorderWidth = Unit.Pixel(0);
....



However, unfortunately, in the HTML I can still see a <table> tag with the
attribute rules="all".
In FireFox, this causes the lines to be drawn !

How can I suppress those lines reliably ?

Your kind help would be appreciated.
 
E

Eliyahu Goldin

I don't know why you are getting rules attribute. I am using border:0 in the
stylesheet and there is no rules in the html.

Anyway, regardless what the reason is, setting Attributes["rules"] = "none"
for the grid in PreRender event may help.

Eliyahu
 
D

David Freeman

Hi Eliyahu!

Thanks for the reply! I'm having same problem with peshrad.

I tried your solution but it didn't work out. Any other ideas?

Thanks!!!
David

Eliyahu Goldin said:
I don't know why you are getting rules attribute. I am using border:0 in
the
stylesheet and there is no rules in the html.

Anyway, regardless what the reason is, setting Attributes["rules"] =
"none"
for the grid in PreRender event may help.

Eliyahu

peshrad said:
Hi !

I'm using ASP.NET 1.1 and C# .



For Microsoft Internet Explorer 6.0,
the following code suppresses the drawing of horizontal and vertical
lines
in the web page:

DataGrid dg = new DataGrid();
...
dg.BorderStyle = BorderStyle.None;
dg.BorderWidth = Unit.Pixel(0);
...



However, unfortunately, in the HTML I can still see a <table> tag with
the
attribute rules="all".
In FireFox, this causes the lines to be drawn !

How can I suppress those lines reliably ?

Your kind help would be appreciated.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top