不显示gridview标题时asp.netgridview中的alternaterowstyle问题。 [英] alternaterowstyle problem in asp.netgridview when header of the gridview is not displayed.
问题描述
我有一个gridview,隐藏了showhaeder = false。我已经为joblistview_row_alternative设置了代码隐藏中的alertnatingrowstyle。这就是css的样子
I have a gridview whose are hidden "showhaeder=false". I have set the alertnatingrowstyle in codebehind for joblistview_row_alternative. this is how the css looks
.joblistview_row_alternative
{
background-color:#F3F3F3;
}
gridview上的alernate行将具有#F3F3F3颜色。当我选择一行并取消选择所选行时,颜色会变为白色。
当showheader = true时,同样正常。
The alernate rows on the gridview will be having the color #F3F3F3. When ever i select a row and unselect the selected row the color changes to white.
Same works fine when showheader=true.
推荐答案
我得到了这个工作。添加了一种风格
I got this working. Added a style
.hide_default_header_row
{
display: none;
visibility: hidden;
}
然后将它与asp.gridview的headerstyle相关联并保持showheader = true
,它工作正常。
then associated it with headerstyle of the asp.gridview and kept the "showheader=true"
and it works fine.
这篇关于不显示gridview标题时asp.netgridview中的alternaterowstyle问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!