Primefaces目前不支持固定列.
使用Jquery固定柱来实现相同的效果.参考:http://datatables.net/extras/fixedcolumns/
例:
var oTable2 = $(primfacesDataTableId).find('table').dataTable({
"sScrollX" : "100%", //Scroll
"sScrollY" : "180",
"bAutoWidth" : false,
"bScrollCollapse" : true,
"bPaginate" : false,
"bSort" : false,
"sInfo" : "",
"sInfoEmpty" : ""
});
var oFC = new FixedColumns(oTable2, {
"iLeftColumns" : 4, //Freezed first for columns
"sHeightMatch" : "auto",
"iLeftWidth" : 405
});
Run Code Online (Sandbox Code Playgroud)
谢谢,Shikha
| 归档时间: |
|
| 查看次数: |
19016 次 |
| 最近记录: |