i use jquery floatThead
http://mkoryak.github.io/floatThead/#intro
i had to use a bit of jquery to convert to first row to a thead for it to work.
example below:
$(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">'
}
);
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…