解决方法
我使用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">' } ); });