我正在尝试在这里找到一个快速修复,当我调整SlickGrid列的大小时,标题行相对于网格的主体几个像素关闭。我试过syncColumnCellResize: true,
但仍无法解决问题,我们非常感谢任何建议。
在调整大小之前,列完美对齐
调整大小后,请注意标题行是几个像素关闭
3.Grid Options(我正在使用ColumnPicker插件)
var options = {
editable: true,
enableCellNavigation: true,
enableColumnReorder: true,
showHeaderRow: true,
headerRowHeight: 30,
explicitInitialization: true,
enableTextSelectionOnCells: true,
syncColumnCellResize: true,
autoEdit: false
};
答案 0 :(得分:0)
我遇到了类似的错位问题,似乎只是通过使用forceFitColumns: true
并设置minWidth
,width
,maxWidth
的3个属性来解决它...你也可以查看我也提供答案的这些问题,它也可以帮助你:
Slickgrid: Final column auto size to use all remaining space
Slickgrid column width should automatically get resized according to widest row content
答案 1 :(得分:0)
如果您使用的是bootstrap或其他一些css lib。您可以尝试将以下css添加到您的代码中。
/* compatible with both IE and Chrome */
.slick-header-columns * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}