惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - maoyu417

Size Classes with Xcode 6 Android viewPage notifyDataSetChanged无刷新 android、apple PUSH 异同比较 同一位置(同一个ImageView)显示不同的图片--level-list (转) (Android实战)界面设计注意事项 LinearLayout android:layout_weight的理解 给C盘减减肥,让你电脑飞一般速度! - maoyu417 用SQL查看字符串ASCII码 解决union不能order by问题 利用sender的Parent获取GridView中的当前行(转载) - maoyu417 将某网站设为主页方法 - maoyu417 - 博客园 DataList分页方法一 - maoyu417 - 博客园 SQL区分大小写——转载 字符串间空格在网页上自动合并 Windows Mobil中解决日期显示不正常的方法 VS升级序列号及升级方法 a标签变灰且不可用 ASP.NET读取XML文件4种方法 超时时间已到。在操作完成之前超时时间已过或服务器未响应。
gridview固定表头 - maoyu417 - 博客园
maoyu417 · 2008-04-01 · via 博客园 - maoyu417

1、在<head>里面加上

<script type="text/javascript">

function s()

{

 var t = document.getElementById("<%=GridView1.ClientID%>");

 var t2 = t.cloneNode(true)

 for(i = t2.rows.length -1;i > 0;i--)

 t2.deleteRow(i) 

 t.deleteRow(0) 

 a.appendChild(t2)

}

window.onload = s

</script>

2、在“GridView”前后加上
<div id="a"></div>
<div style="overflow-y: scroll; height: 120px">
<asp:GridView>
</asp:GridView>
</div>

3、在2的前面加上

就行了。

4、注意问题:要让表头和表身的各自段对应,则要设置gridview的编辑列,进入设置每列的headerstyle和Itemstyle的width属性,并且两个值要统一。