[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6878
  • Last Modified:

Simple: Stylesheet for presenting gridview

hi
i am using gridview and i created my own .css file ...with my stylesheet the grid is not at all looking great...!
can someone give me examples for a presentable show of gridview

thanks
0
samir25
Asked:
samir25
  • 8
  • 2
1 Solution
 
chinu1310Commented:
Can you post your CSS here. Than I can suggest you some changes.

But According to me you should change the properties of gridview in order to look it better.
0
 
samir25Author Commented:
body {
}
.FooterStyle
{
    background-color: #a33;
    color:BLUE;
    text-align:right;
}

.HeaderStyle
{
    background-color: #E0E0E0;
    color:Green;
    text-align:center;
}

in aspx i have <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AllowPaging="true" PageSize="15"
                FooterStyle-CssClass="FooterStyle" AutoGenerateColumns="False" OnSorting="GridView1_Sorting" Width="100%"
                PagerSettings-FirstPageText="First" PagerSettings-PreviousPageText="Prev" PagerSettings-LastPageText="Last"
                PagerSettings-NextPageText="Next" PagerStyle-BackColor="#E0E0E0" PagerStyle-HorizontalAlign="Center">
       <Columns>
        <asp:BoundField DataField="test_id" HeaderText="Test Id" SortExpression="test_id" ItemStyle-HorizontalAlign="Center"  ItemStyle-Font-Size="Small" ItemStyle-Width="10%"/>
        <asp:BoundField DataField="serial" HeaderText="Serial" SortExpression="serial" ItemStyle-HorizontalAlign="Center"  ItemStyle-Font-Size="Small" ItemStyle-Width="10%"/>
        <asp:BoundField DataField="Station" headertext="Test Station" SortExpression="Station" ItemStyle-HorizontalAlign="center"  ItemStyle-Font-Size="Small" ItemStyle-Width="10%"/>
        <asp:BoundField DataField="Start_Time" headertext="Time Started" SortExpression="Start_Time"  ItemStyle-HorizontalAlign="center"  ItemStyle-Font-Size="Small" ItemStyle-Width="10%"/>
        <asp:BoundField DataField="xml_data" headertext="Exception Text" ItemStyle-HorizontalAlign="center"  ItemStyle-Font-Size="Small" ItemStyle-Width="60%"/>
       
       </Columns>
       <AlternatingRowStyle BackColor="#FFFFC0" HorizontalAlign="Center" VerticalAlign="Middle" />
       
        </asp:GridView>
0
 
chinu1310Commented:
Ok.

.header
{
      font-family:Verdana;
      font-style:normal;
      font-size:10px;
      background-color:#336699;
      color:Black;
      text-align:center;
}

.footer
{
      font-family:Verdana;
      font-style:normal;
      font-size:10px;
      background-color:#336699;
      color:Black;
      text-align:center;
}
Try this one
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
chinu1310Commented:
Also add this class to your row style css class

.content
{
      font-family:Verdana;
      font-style:normal;
      font-size:12px;
      background-color:White;
      color:Black;
      text-align:left;
}
0
 
chinu1310Commented:
This is even better.
.header
{
      font-family:Verdana;
      font-style:normal;
      font-size:10px;
      background-color:#336699;
      color:White;
      text-align:center;
}

Header fonts to white.
0
 
chinu1310Commented:
Did that work for you ?
0
 
samir25Author Commented:
honestly i was looking for more. but thats ok...i will keep that as secondary option and will search on net for soem good-looking options.
0
 
chinu1310Commented:
Well that depends on what is color schema of your web page. And according to that you can modify your gridview.

Will let you know if I come across anything good
0
 
chinu1310Commented:
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now