Horizontal Gridlines not showing up

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    Horizontal Gridlines not showing up

    I can not get the horizontal gridlines to show up on a Gridview. I have
    changed the selection to both and horizontal with no sign of them. Also,
    when I set the Gridlines property to Vertical or Both, the Vertical lines
    show up but they are the wrong color. Which property controls the color of
    the gridlines? I have tried using a stylesheet to set the border of the
    rows, footer, and header but this does not work either. The page does not
    have any other styles associated with it.

    Thanks for any assistance you can provide.

    Matt Adams
  • Patrick.O.Ige

    #2
    Re: Horizontal Gridlines not showing up

    Matt try posting something.
    If possible your CSS class
    Patrick

    "Matt" <Matt@discussio ns.microsoft.co m> wrote in message
    news:909AE740-2F10-423F-BC9E-B8D0B5DE4FF0@mi crosoft.com...[color=blue]
    >I can not get the horizontal gridlines to show up on a Gridview. I have
    > changed the selection to both and horizontal with no sign of them. Also,
    > when I set the Gridlines property to Vertical or Both, the Vertical lines
    > show up but they are the wrong color. Which property controls the color
    > of
    > the gridlines? I have tried using a stylesheet to set the border of the
    > rows, footer, and header but this does not work either. The page does not
    > have any other styles associated with it.
    >
    > Thanks for any assistance you can provide.
    >
    > Matt Adams[/color]


    Comment

    • Matt

      #3
      Re: Horizontal Gridlines not showing up

      Hi Patrick,

      Thanks for the suggestion. Here is the gridview markup.

      <asp:GridView ID="gvUsers" runat="server" AutoGenerateCol umns="False"
      CssClass="gridv iew" GridLines="Both " ShowFooter="Tru e" EmptyDataText=" No User
      Accounts associated with this School." BorderColor="#4 04040"
      BorderStyle="So lid" BorderWidth="1p x" CellPadding="2" EnableTheming=" False"
      UseAccessibleHe ader="False">
      <FooterStyle BackColor="DimG ray" BorderColor="Di mGray"
      BorderStyle="So lid" BorderWidth="1p x" ForeColor="DimG ray" />
      <Columns>
      <asp:TemplateFi eld HeaderText="Edi t">
      <ItemTemplate >
      <asp:ImageButto n ID="EditButton1 " runat="server"
      ImageUrl="~/Images/Edit.GIF"
      CommandArgument ='<%# Eval("sAMAccoun tName") %>'
      CommandName="Ed itUser" />
      </ItemTemplate>
      <ItemStyle HorizontalAlign ="Center"
      VerticalAlign=" Middle" Wrap="True" />
      <FooterTemplate ><asp:Button ID="btnNew" runat="server"
      Height="26px" Text="Add User" CommandName="Ne wUser" /></FooterTemplate>
      </asp:TemplateFie ld>
      <asp:TemplateFi eld HeaderText="Pas sword"><ItemTem plate>
      <asp:ImageButto n ID="CPButton1" runat="server"
      ImageUrl="~/Images/password.GIF"
      CommandArgument ='<%# Eval("sAMAccoun tName") %>'
      CommandName="Se tPassword" />
      </ItemTemplate> <ItemStyle HorizontalAlign ="Center"
      VerticalAlign=" Middle" Wrap="True" />
      </asp:TemplateFie ld>
      <asp:TemplateFi eld HeaderText="Del ete">

      <ItemTemplate >
      <asp:ImageButto n ID="DeleteButto n1" runat="server"
      ImageUrl="~/Images/DELETE.GIF"
      CommandArgument ='<%# Eval("sAMAccoun tName") %>'
      CommandName="De leteUser" />
      </ItemTemplate>
      <ItemStyle HorizontalAlign ="Center"
      VerticalAlign=" Middle" Wrap="True" />
      </asp:TemplateFie ld>
      <asp:BoundFie ld HeaderText="Fir st Name"
      DataField="Firs tName">
      <ItemStyle HorizontalAlign ="Left"
      VerticalAlign=" Middle" Wrap="False" />
      </asp:BoundField>
      <asp:BoundFie ld HeaderText="Las t Name"
      DataField="Last Name">
      <ItemStyle HorizontalAlign ="Left"
      VerticalAlign=" Middle" Wrap="False" />
      </asp:BoundField>
      <asp:BoundFie ld HeaderText="Use r Login" DataField="UPN" >
      <ItemStyle HorizontalAlign ="Left"
      VerticalAlign=" Middle" Wrap="False" />
      </asp:BoundField>
      <asp:BoundFie ld HeaderText="Rol e" DataField="Role " />
      <asp:BoundFie ld DataField="sAMA ccountName"
      HeaderText="sAM AccountName" Visible="False" />
      </Columns>
      <RowStyle BackColor="Whit eSmoke" BorderColor="Di mGray"
      BorderStyle="So lid" BorderWidth="1p x" />
      <SelectedRowSty le BackColor="#000 099" Font-Bold="True"
      ForeColor="Whit e" CssClass="heade r" />
      <PagerStyle BackColor="#CCC CCC" ForeColor="Blac k"
      HorizontalAlign ="Left" />
      <HeaderStyle CssClass="gridv iewheader" BorderColor="Di mGray"
      BorderStyle="So lid" BorderWidth="1p x"/>
      <PagerSetting s Mode="NextPrevi ousFirstLast" />
      <AlternatingRow Style BackColor="Gain sboro"
      BorderColor="Bl ack" BorderStyle="So lid" BorderWidth="1p x" />
      </asp:GridView>

      Here is the css file

      ..gridview
      {
      border-color:Black;
      border-style: solid;
      border-width: thin;
      padding:2 4 2 4;
      font-family: Tahoma;
      color:Black;
      Height: 1px;
      Width: 100%;
      }

      ..gridviewheade r
      {
      background-color:#696969;
      border-color:#696969;
      color:#FDCC0F;
      font-weight: bold;
      font-size:medium;
      vertical-align: middle;
      text-transform: capitalize;
      font-family: Tahoma;
      text-align: center;
      width: 100%;
      }

      Thanks for any suggesstions.

      Matt

      "Patrick.O. Ige" wrote:
      [color=blue]
      > Matt try posting something.
      > If possible your CSS class
      > Patrick
      >
      > "Matt" <Matt@discussio ns.microsoft.co m> wrote in message
      > news:909AE740-2F10-423F-BC9E-B8D0B5DE4FF0@mi crosoft.com...[color=green]
      > >I can not get the horizontal gridlines to show up on a Gridview. I have
      > > changed the selection to both and horizontal with no sign of them. Also,
      > > when I set the Gridlines property to Vertical or Both, the Vertical lines
      > > show up but they are the wrong color. Which property controls the color
      > > of
      > > the gridlines? I have tried using a stylesheet to set the border of the
      > > rows, footer, and header but this does not work either. The page does not
      > > have any other styles associated with it.
      > >
      > > Thanks for any assistance you can provide.
      > >
      > > Matt Adams[/color]
      >
      >
      >[/color]

      Comment

      Working...