如何使用c#修复asp.net中网格的标题 [英] How to Fix header of grid in asp.net using c#

查看:76
本文介绍了如何使用c#修复asp.net中网格的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在asp.net网页上滚动修复网格视图的标题。我已经实现了它,但没有在Chrome和Firefox上工作。



需要紧急解决方案。




先谢谢。

解决方案

请参考以下链接:

一些文章CP:

带有固定标题的网格视图 [ ^ ]

Gridview固定标题 [ ^ ]



一个带有.NET中固定标题的可滚动GridView [ ^ ]

jQuery Fixed Header Scrollable GridView [ ^ ]

网格视图固定标题 [ ^ ]



一些解决了答案:

gridview scroll with fixed header and页脚 [ ^ ]

在asp.net中具有固定标题的可滚动GridView [ ^ ] < br $> b $ b

Gridview固定标题问题 [ ^ ]



或者

试试这个:



在css文件夹中创建一个CSS文件grid.css一个类grid-header.css文件夹位于根目录下



 grid-header  
{
font-weight < span class =code-keyword> bold;
font-family Verdana;
font-size 11px;
background-color #7A9FCB;
text-decoration 下划线;
颜色 #ffffff;
text-align left;
position relative;
top expression(this.parentNode.parentNode.parentNode.scrollTop-2);
left expression(this.parentNode。 parentNode.parentNode.scrollLeft-1);
right 1px;
}





从您的页面调用此CSS文件,这是包含你的网格

link href =../ css / grid.css =stylesheettype =text / css/



从你的gridview的HeaderStyle调用这个css

 <   HeaderStyle     CssClass   =  grid-header >  <   / HeaderStyle  >  


这些文章中的一些可能对您有所帮助

Gridview with Fixed Header [ ^ ]

诀窍修复Gridview标题

i wants to fix the header of grid view on scroll in asp.net web page . I have achieved it but not working on Chrome and firefox.

Need Urgent Solution.


Thanks in Advance.

解决方案

Please refer following links:
some articles on CP:
Grid View with Fixed Header[^]
Gridview Fixed Headers[^]

A Scrollable GridView with a Fixed Header in .NET[^]
jQuery Fixed Header Scrollable GridView[^]
GridView Fixed Header[^]

some solved answers:
gridview scroll with fixed header and footer[^]
Scrollable GridView with fixed headers in asp.net[^]

Gridview Fixed Header Issue[^]

Or else
Try this:

Create a CSS file "grid.css" within a folder "css" with a class "grid-header".The css folder is under the root directory

.grid-header
{
font-weight: bold;
font-family: Verdana;
font-size: 11px;
background-color: #7A9FCB;
text-decoration: underline;
color: #ffffff;
text-align: left;
position: relative;
top:expression(this.parentNode.parentNode.parentNode.scrollTop-2);
left:expression(this.parentNode.parentNode.parentNode.scrollLeft-1);
right:1px;
}



Call this CSS File from your page which is contain your grid
link href="../css/grid.css" rel="stylesheet" type="text/css" /

call this css from the HeaderStyle of your gridview

<HeaderStyle CssClass="grid-header"></HeaderStyle>


Some of these article may helpful to you
Gridview with Fixed Header[^]
Trick to fix Gridview Header


这篇关于如何使用c#修复asp.net中网格的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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