我有两个KOgrid问题。KO Grid Scrollbars not visible&显示问题
1)我无法在kogrid中获得滚动条。在没有滚动条的情况下进行数据输入非常困难。
2)我也无法使kogrid工作,而没有指定硬编码的高度和宽度。在我的应用程序中,我不能有固定的高度和宽度。 其他人有同样的问题吗?
我试着从这个线程(使用jQuery修复作为我的viewmodel中的最后一行)的解决方法建议。 KO Grid Display Isseues, On resize Gird shows one row. Images also included
只是增加了网格的大小,但它没有显示任何数据。但是,当我调整页面数据显示。
下面是我的HTML和kogrid选项(我试过有和无分页选项,理想我不想使用分页)
<div data-bind="koGrid: gridOptions"
style="height: 800px; background-color: none;width: 1850px;">
</div>
self.gridOptions = {
data: self.mydatarray,
footerVisible: true,
displaySelectionCheckbox: true,
afterSelectionChange: self.RowSelectionChange,
rowHeight: 50,
selectWithCheckboxOnly: true,
enableSorting: false,
multiSelect: true,
selectedItems: self.SelectedRows,
enableColumnResize: true,
showFilter: false,
canSelectRows: true,
enablePaging: true,
pagingOptions: {
currentPage: ko.observable(1),
pageSize: ko.observable(3),
pageSizes: ko.observableArray([3, 6, 9])
},
rowTemplate: errrowtmpl,
columnDefs: [
{ field: 'Customer', displayName: 'Customer', cellTemplate: Customersddedittmpl, headerCellTemplate: headercelltmpl },
...
...
{ field: 'GenNotes', displayName: 'GenNotes', cellTemplate: simpleedittmpl, headerCellTemplate: headercelltmpl }
]
}
请让我知道如果你需要更多的信息
谢谢
肯纳开发