Click here to Skip to main content
16,016,643 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i want to hide the gridview horizantal and vertical line, And i want to border with header and footer row

i tried the following
Border=black
gridline=none
but it shows only the border, here i want to show the border for header row and the footer row
Posted
Comments
prashantdelhi51 18-Nov-11 2:46am    
GridLines=None;

Set
C#
GridLines="None"

C#
<asp:GridView ID="GridView3" ShowFooter="true"  runat="server" AutoGenerateColumns="False" Font-Bold="False" Font-Names="Tahoma" Font-Size="11px" ForeColor="#4C4C4C"
          GridLines="None" >
          <columns>
                <asp:BoundField DataField="uname" HeaderText="uname"  />
                <asp:BoundField DataField="upass" HeaderText="upass" />
                <asp:BoundField DataField="active" HeaderText="active"/>
          </columns>
               <rowstyle backcolor="#EFF3FB" />
                                <editrowstyle backcolor="#2461BF" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <pagerstyle backcolor="#2461BF" forecolor="White" horizontalalign="Center" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" Font-Names="Tahoma" Font-Size="11px"
                                    ForeColor="White" Height="25px" HorizontalAlign="Left" />
                                 <footerstyle backcolor="#507CD1" font-bold="True" forecolor="White" />
                                <alternatingrowstyle backcolor="White" />
 
Share this answer
 
v4
use

ShowHeader = true and ShowFooter = true

HeaderStyle and FooterStyle ( BorderColor, BorderStyle, BorderWidth)

GridLines = none

Hope this will help you.
 
Share this answer
 
add this styles and

XML
<style type="text/css">
       .headerow
       {
           border: solid 1px #DCDCDC;
       }
       .footerrow
       {
           border: solid 1pxx #DCDCDC;
       }
   </style>




for grid view use this

GridLines = none

XML
<HeaderStyle CssClass="headerow" />
<RowStyle CssClass="footerrow" />
 
Share this answer
 
v2
In your aspx.cs page type this

GridView1.GridLines=None;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900