如何在asp.net中隐藏网格视图水平和垂直线 [英] How to hide grid view horizontal and vertical line in asp.net

查看:84
本文介绍了如何在asp.net中隐藏网格视图水平和垂直线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏gridview的水平和垂直线,并且我想与页眉和页脚行边框

我尝试了以下
边框=黑色
gridline = none
但它仅显示边框,在这里我想显示页眉行和页脚行的边框

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

推荐答案

Set
GridLines="None"


<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" />


使用

ShowHeader = true和ShowFooter = true

HeaderStyle和FooterStyle(BorderColor,BorderStyle,BorderWidth)

GridLines = none

希望对您有帮助.
use

ShowHeader = true and ShowFooter = true

HeaderStyle and FooterStyle ( BorderColor, BorderStyle, BorderWidth)

GridLines = none

Hope this will help you.


http://msdn.microsoft.com/zh-CN/library/system.web.ui.webcontrols.gridview_properties.aspx [

这篇关于如何在asp.net中隐藏网格视图水平和垂直线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆