Gridview Gridlines color

Discussion in 'ASP .Net' started by tshad, Jan 19, 2010.

  1. tshad

    tshad Guest

    I have a small GridView that defaults to the gridlines being white.

    The problem is that I am setting my background to white.

    How do I set the GridLines to "#a6a6a6"?

    Thanks,

    Tom
    tshad, Jan 19, 2010
    #1
    1. Advertising

  2. On Jan 20, 12:55 am, "tshad" <> wrote:
    > I have a small GridView that defaults to the gridlines being white.
    >
    > The problem is that I am setting my background to white.
    >
    > How do I set the GridLines to "#a6a6a6"?
    >
    > Thanks,
    >
    > Tom


    Did you try to set like this BorderColor="#a6a6a6" BorderStyle="Solid"
    BorderWidth="1" ?
    Alexey Smirnov, Jan 20, 2010
    #2
    1. Advertising

  3. tshad

    tshad Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On Jan 20, 12:55 am, "tshad" <> wrote:
    > I have a small GridView that defaults to the gridlines being white.
    >
    > The problem is that I am setting my background to white.
    >
    > How do I set the GridLines to "#a6a6a6"?
    >
    > Thanks,
    >
    > Tom


    > Did you try to set like this BorderColor="#a6a6a6" BorderStyle="Solid"
    > BorderWidth="1" ?


    Yes, here is my GridView

    <asp:GridView ID="GridView2"
    BackColor="White"
    BorderColor="#a6a6a6"
    BorderStyle="Solid"
    BorderWidth="1"
    AutoGenerateColumns="false"
    ShowHeader="false"
    GridLines="Both"
    CellPadding="0"
    CellSpacing="0"
    Font-Names="Verdana, Arial, Helvetica, sans-serif"
    Font-Bold="false"
    Font-Size="9px"
    runat="server">
    <HeaderStyle BorderStyle="None" />
    <Columns>
    <asp:TemplateField HeaderText="Jobs"
    HeaderStyle-BackColor="#a6a6a6" HeaderStyle-Font-Size="11px">
    <ItemTemplate>
    <asp:Label ID="lblJobs" Width="60px" Text='<%#
    Eval("Text") %>' runat="server" />
    </ItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:Label ID="lblJobIDs" style=" " Visible="false"
    Text='<%# Eval("Value") %>' runat="server" />
    </ItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Buckets"
    HeaderStyle-BackColor="#e6e6e6" HeaderStyle-ForeColor="Black"
    HeaderStyle-Font-Size="11px">
    <ItemTemplate>
    <asp:DropDownList ID="ddlBuckets" runat="server">
    <asp:ListItem Selected="True">
    </asp:ListItem>
    <asp:ListItem Value="1">1</asp:ListItem>
    <asp:ListItem Value="2">2</asp:ListItem>
    <asp:ListItem Value="3">3</asp:ListItem>
    <asp:ListItem Value="4">4</asp:ListItem>
    </asp:DropDownList>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>

    But I get a white background with a border around the grid but no gridlines
    showing (I even tried to set the backcolor to red and it still shows only
    the border around the grid as red).

    Thanks,

    Tom
    tshad, Jan 20, 2010
    #3
    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. Mike P

    GridView Gridlines

    Mike P, Apr 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    893
    Mike P
    Apr 26, 2006
  2. =?Utf-8?B?Vmlua2k=?=

    disapearing gridlines in gridview

    =?Utf-8?B?Vmlua2k=?=, Apr 26, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    662
    Ray Costanzo
    Apr 27, 2007
  3. Magnus Blomberg

    GridView -> Excel = no gridlines

    Magnus Blomberg, Oct 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    187
    Magnus Blomberg
    Oct 21, 2005
  4. Vinki

    disappearing gridlines in gridview

    Vinki, Apr 26, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    244
    KyleK
    May 17, 2007
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    364
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page