如何避免GridView中的行空间 [英] how to avoid row space in gridview

查看:90
本文介绍了如何避免GridView中的行空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何避免在gridview中的行之间留空格.,

how to avoid space between rows in gridview.,

推荐答案


您是否尝试过如何设置gridview行高 [ http://forums. asp.net/t/1201271.aspx/1?How+do+I+add+Spacing+Between+Rows+in+a+GridView+ [ http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.cellpadding.aspx [
Hi,
Did you try with google[^]? This itself will give you about 95,600 results in 0.13 seconds.

Here you go:
how to set gridview row height[^]
http://forums.asp.net/t/1201271.aspx/1?How+do+I+add+Spacing+Between+Rows+in+a+GridView+[^]
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.cellpadding.aspx[^]

--Amit




有多种方法可以显示行之间的空间.喜欢:
1.使用带有填充的css样式并将其应用于GridView.
2.使用模板化GridView的ItemStyle-Height属性.
3.在GridView的行之间插入一个新的表行.
对于CSS,您可以按以下方式创建它:
hi

There are various ways to show the space between the rows. Like:
1. Use the css style with the padding and appy to the GridView.
2. Use the ItemStyle-Height property of the templated GridView.
3. Insert a new table row between the rows of GridView.
For css, you can create it like below:
.space td {
border-color:Blue;
border-style: solid;
border-bottom-width: 20px
}


现在将此样式应用于行:


Now apply this style to the rows as :

<asp:gridview id="GridView1" runat="server" alternatingrowstyle-cssclass="space" rowstyle-cssclass="space" xmlns:asp="#unknown" />


您也可以通过下面的链接获取更多示例:
http://forums.asp.net/p/1201271/2093194.aspx [ ^ ]
谢谢与问候
sandeep


Also you can go through the below link where you cna get some more examples:
http://forums.asp.net/p/1201271/2093194.aspx[^]
Thanks&Regards
sandeep


这篇关于如何避免GridView中的行空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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