如何使用angularjs在空剑道网格中显示水平滚动条

how to show horizontal scroll bar in empty kendo grid using angularjs

本文关键字:网格 显示 水平 滚动条 何使用 angularjs      更新时间:2024-05-14

如何使用angularjs在空剑道网格中显示水平滚动条?。显示剑道网格如果没有记录,它只显示没有水平滚动条的列标题。

最后我找到了使用angularjs应用水平滚动条空剑道网格的解决方案。

dataBound: function () {
                if (this.dataSource.view().length == 0) {
                    //insert empty row
                    var colspan = this.thead.find("th").length;
                    var emptyRow = "<tr><td colspan='" + colspan + "'></td></tr>";
                    this.tbody.html(emptyRow);
                    //workarounds for IE lt 9
                    this.table.width(800);
                    $(".k-grid-content").height(2 * kendo.support.scrollbar());
                }
                else {
                    //To reset width and height once record filled in the grid
                    this.table.width('100%');
                    $(".k-grid-content").height('');
                }
}