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

Discussion in 'ASP .Net Web Controls' started by David Freeman, Nov 8, 2004.

  1. 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
     
    David Freeman, Nov 8, 2004
    #1
    1. Advertising

  2. ....

    "David Freeman" <> wrote in message
    news:...
    > 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
    >
     
    David Freeman, Nov 8, 2004
    #2
    1. Advertising

  3. Re: DataGrid - BorderStyle="None" and BorderWidth="None" doesn't w

    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



    "David Freeman" wrote:

    > ....
    >
    > "David Freeman" <> wrote in message
    > news:...
    > > 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
    > >

    >
    >
    >
     
    Patrick.O.Ige, Nov 8, 2004
    #3
  4. Re: DataGrid - BorderStyle="None" and BorderWidth="None" doesn't w

    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

    "Patrick.O.Ige" <> wrote in message
    news:...
    > 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
    >
    >
    >
    > "David Freeman" wrote:
    >
    >> ....
    >>
    >> "David Freeman" <> wrote in message
    >> news:...
    >> > 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
    >> >

    >>
    >>
    >>
     
    David Freeman, Nov 9, 2004
    #4
  5. Re: DataGrid - BorderStyle="None" and BorderWidth="None" doesn't w

    David..
    Did u find a solution for that?



    "David Freeman" wrote:

    > 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
    >
    > "Patrick.O.Ige" <> wrote in message
    > news:...
    > > 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
    > >
    > >
    > >
    > > "David Freeman" wrote:
    > >
    > >> ....
    > >>
    > >> "David Freeman" <> wrote in message
    > >> news:...
    > >> > 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
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >
     
    Patrick.O.Ige, Dec 10, 2004
    #5
  6. David Freeman

    Nay Myo Aung Guest

    Re: DataGrid - BorderStyle="None" and BorderWidth="None" doesn't w

    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/


    "Patrick.O.Ige" <> wrote in message
    news:...
    > David..
    > Did u find a solution for that?
    >
    >
    >
    > "David Freeman" wrote:
    >
    >> 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
    >>
    >> "Patrick.O.Ige" <> wrote in message
    >> news:...
    >> > 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
    >> >
    >> >
    >> >
    >> > "David Freeman" wrote:
    >> >
    >> >> ....
    >> >>
    >> >> "David Freeman" <> wrote in message
    >> >> news:...
    >> >> > 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
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Nay Myo Aung, Dec 27, 2004
    #6
    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. David Freeman
    Replies:
    8
    Views:
    7,733
    tcena9
    Feb 16, 2011
  2. Iain Wilson
    Replies:
    1
    Views:
    358
    Munna
    Aug 7, 2008
  3. Christophe Sauvage

    BorderWidth of the control asp:ImageButton does not work in firefox

    Christophe Sauvage, Oct 5, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    143
    Christophe Sauvage
    Oct 5, 2007
  4. Replies:
    3
    Views:
    141
  5. spifster

    borderStyle = "none" leaves blank spaces

    spifster, Jun 5, 2006, in forum: Javascript
    Replies:
    2
    Views:
    218
    spifster
    Jun 7, 2006
Loading...

Share This Page