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

时间:2016-04-12 18:23:42

标签: javascript angularjs html5 kendo-ui kendo-grid

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

1 个答案:

答案 0 :(得分:0)

最后,我找到了使用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('');
                }
}
&#13;
&#13;
&#13;

相关问题