1
我在SAPUI5应用程序中使用Handsontable。我无法滚动到Handsontable Grid,其中列标题保持不变。由于这种情况,当用户单击列标题进行排序时,整个列将被选中,滚动将运行到表中的最后一行。尽管在设置中指定排序,排序并不仅限于第二列。Handsontable Column Selection and Sorting问题
以下是我的代码,其后是截图。请帮我解决这个问题。
查看:
<HTML xmlns="sap.ui.core" busy="false" busyIndicatorDelay="1000" visible="true"
content="<div id='batchesSheet' class='hot handsontable' style='width: 90%; overflow: hidden'></div>"
preferDOM="true" sanitizeContent="false" afterRendering="BatchesHOT">
</HTML>
控制器:
hotBatches = new Handsontable(container, {
data: batchesData,
rowHeaders: true,
columns: [{data: "User", readOnly: true}, {data: "Timestamp", readOnly: true}, {data: "Status", readOnly: true}, {
data: "Remarks",
readOnly: true
}],
colHeaders: ["USER", "BATCH SUBMISSION TIME", "STATUS", "REMARKS"],
colWidths: [100, 220, 180, 350],
columnSorting: {
column: 2,
sortOrder: true
},
sortIndicator: true,
contextMenu: true,
search: true,
outsideClickDeselects: false,
cells: function (row, col, prop) {
var cellProperties = {};
if (col === 2) {
cellProperties.renderer = "statusRenderer";
}
else {
cellProperties.renderer = "textRenderer";
}
return cellProperties;
}
});
对不起,这是什么问题?是否希望标题保持冻结?或者当你排序时,你的桌子一直滚动到底部?或两者?第一个问题是你的'overflow:hidden'选项 – ZekeDroid
都是@ZekeDroid。这两个都是问题! –