【问题标题】:How to scroll to bottom of kendo list view control如何滚动到剑道列表视图控件的底部
【发布时间】:2019-06-20 17:28:47
【问题描述】:

我正在构建一个应用程序,我需要在 kendo listview 控件的底部显示最近的项目,因此滚动应该位于底部位置。

我尝试了以下方法,但未能达到预期的效果。

listView.select(listView.element.children().last());

var lastElement = $(".container").last(); $(this.messageListId).animate({ scrollTop: lastElement.scrollTop() }, 1000);

在 kendolist 视图的数据源上设置滚动条应该设置为底部

【问题讨论】:

  • 我也面临同样的问题。

标签: javascript jquery asp.net-mvc kendo-ui kendo-listview


【解决方案1】:
let listView = $('#id').data("kendoListView");
var children = listView.element.children();
if (children.length > 0) {
  children.last().get(0).scrollIntoView(true);
}

【讨论】:

    猜你喜欢
    • 2014-07-11
    • 2021-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-09
    • 1970-01-01
    相关资源
    最近更新 更多