gpt4 book ai didi

asp.net - 卡住标题,滚动 GridView

转载 作者:行者123 更新时间:2023-12-04 08:55:59 26 4
gpt4 key购买 nike

如何卡住 Asp.net gridview header ? 我试图以不同的方式做到这一点,但无法做到。

我正在使用 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">'
}
);
});

关于asp.net - 卡住标题,滚动 GridView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9648727/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com