加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 冻结标题,滚动GridView

发布时间:2020-12-16 04:06:04 所属栏目:asp.Net 来源:网络整理
导读:如何冻结 Asp.net gridview标题?我试图以不同的方式做到这一点,但不能. 我正在使用ASP 2.0和VS 2010. 谁能帮我? 解决方法 我使用jquery floatThead http://mkoryak.github.io/floatThead/#intro 我不得不使用一些jquery转换到第一行到thead工作. 示例如下
如何冻结 Asp.net gridview标题?我试图以不同的方式做到这一点,但不能.

我正在使用ASP 2.0和VS 2010.

谁能帮我?

解决方法

我使用jquery floatThead

http://mkoryak.github.io/floatThead/#intro

我不得不使用一些jquery转换到第一行到thead工作.

示例如下:

$(document).ready(function () {
    var $theadCols = $("#ContentPlaceHolder1_grdCashflow  tr:first-child"),$table = $("#ContentPlaceHolder1_grdCashflow");

    // create thead and append <th> columns
    $table.prepend("<thead/>");
    $table.find("thead").append($theadCols);

    // init stickyHeader
    $table.floatThead();

    //$table = $("#ContentPlaceHolder1_grdCashflow");
    $table.dataTable(
    {
        "paging": false,"ordering": false,"dom":'<"top"fi>rt<"bottom"><"clear">'
    }
    );
});

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读