How to scroll to bottom of kendo list view control

830 Views Asked by At

I am building an application where I need to show the most recent item to the bottom of the kendo listview control and therefore the scroll should be at the bottom position.

I tried the following ways but was not able to achieve the desired result.

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

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

On the data source of the kendolist view is set the scrollbar should be set to bottom

1

There are 1 best solutions below

0
Nilesh On BEST ANSWER
let listView = $('#id').data("kendoListView");
var children = listView.element.children();
if (children.length > 0) {
  children.last().get(0).scrollIntoView(true);
}