This is a migrated thread and some comments may be shown as answers.

Scroll listbox to the bottom?

1 Answer 47 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Timo
Top achievements
Rank 1
Timo asked on 27 Dec 2019, 08:25 AM
It there a way to sroll a listbox to the bottom programmatically? I just want to scroll the box to the bottom, without selecting any element on the list.

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 27 Dec 2019, 11:29 AM

Hi Timo,

The Kendo UI ListBox widget is compiled down to simple HTML. Therefore, you could access the height of the list holding the items and programmatically scroll down the parent element of this list. Here is an example:

var height = $(".k-listbox ul.k-list:eq(0)").height();
$(".k-listbox ul.k-list:eq(0)").closest(".k-list-scroller").scrollTop(height);

I hope you find this helpful.

 

Regards,
Tsvetomir
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ListBox
Asked by
Timo
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or