Using DataGrid, how to suppress the drawing of lines ?

Discussion in 'ASP .Net' started by peshrad, Nov 3, 2004.

  1. peshrad

    peshrad Guest

    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.
    peshrad, Nov 3, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    Eliyahu Goldin, Nov 4, 2004
    #2
    1. Advertising

  3. Hi peshrad!

    I'm having the same problem!!

    rules attribute is a Microsoft IE extension to table:
    http://msdn.microsoft.com/library/d...author/dhtml/reference/properties/rules_0.asp

    I also tried the solution suggested by Eliyahu Goldin but it didn't work.
    Did you solved this problem??? If so could you plz share with the newsgroup?

    cheers!!
    David


    "peshrad" <> wrote in message
    news:...
    > 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.
    >
    >
    David Freeman, Nov 8, 2004
    #3
  4. 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" <> wrote in message
    news:%...
    >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" <> wrote in message
    > news:...
    >> 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.
    >>
    >>

    >
    >
    David Freeman, Nov 8, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    drawing lines on a webform

    =?Utf-8?B?UGF1bA==?=, Jul 29, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,344
    Mythran
    Jul 30, 2004
  2. anthonyroche

    Drawing lines on a chart

    anthonyroche, Nov 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    384
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Nov 8, 2004
  3. Replies:
    1
    Views:
    621
    Kevin Spencer
    Jan 9, 2006
  4. Thomas Fritsch
    Replies:
    18
    Views:
    1,062
    Chris Uppal
    Sep 12, 2005
  5. defn noob
    Replies:
    1
    Views:
    371
    Mark Space
    Jun 28, 2008
Loading...

Share This Page