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

推荐订阅源

C
Check Point Blog
美团技术团队
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
月光博客
月光博客
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
J
Java Code Geeks
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Vercel News
Vercel News
博客园 - 聂微东

博客园 - 探路者

编辑用户资料的时候,让用户的密码以星花显示 模仿层遮盖网页浏览区 gridview列 数字、货币和日期 显示格式 Blog常用拖动模块 摘录小代码合集[1] 注册时阅读条款倒计时控制 通用JS倒计时代码 去除网页FLASH"单击并激活此控件"解决办法 Js实现Checkbox的全选/反选 实用天气代码 银行软键盘代码 改善用户体验之密码强度提示 div制作三角图标 IE滚动条样式 【WEB控件】[GridView系列]Panel+GridView 常用CSS样式 【HTML控件】[TextBox系列]搜索输入关键字 可以移动的漂浮层 Div滚动条样式
【Web控件】[GridView系列]给GridView添加滚动条
探路者 · 2007-09-29 · via 博客园 - 探路者

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="functions_Investigate_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <style type="text/css">
     .Freezing
   {    
        position:relative ;
        table-layout:fixed;
        top:expression(this.offsetParent.scrollTop);  
        z-index: 10;
   }

.Freezing th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:2px;}
</style>
</head>
<body>
    <form id="form1" runat="server">
            <div style="overflow-y: scroll; height: 200px; width: 300px">
                <!--设置Div带滚动条-->
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                    Font-Size="12px" DataKeyNames="ProductID" DataSourceID="SqlDataSource1" AllowSorting="True">
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />
                        <asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID" />
                        <asp:BoundField DataField="SupplierID" HeaderText="SupplierID" SortExpression="SupplierID" />
                        <asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
                        <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" SortExpression="CategoryID" />
                    </Columns>
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" CssClass="ms-formlabel DataGridFixedHeader" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" CssClass="Freezing" />
                </asp:GridView>
                <!--调用样式固定表头-->
            </div>
    </form>
</body>
</html>