New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Implementing "moveTop" and "moveBottom" Custom Tools


Product Telerik UI for ASP.NET MVC ListBox
Progress Telerik UI for ASP.NET MVC version Created with the 2023.3.1010 version


How can I create custom tools ("moveTop" and "moveBottom") that move the selected option at the top or the bottom of all ListBox options?


The ListBox supports MoveUp() and MoveDown() that move up and down the selected option. To create tools that move the option to the top or the bottom of the options list, follow the steps below:

  1. Create two buttons and handle their Click events.
  2. Get a reference to the ListBox and use the client-side API methods select() and reorder() to get the selected item and move it to the respective position.
  3. To render the "moveTop" and "moveBottom" buttons within the toolbar, handle the DataBound event of the ListBox and use the jQuery append() method to append each button in the k-listbox-actions element.

            .Toolbar(toolbar =>
                toolbar.Tools(tools => tools
            .Events(ev => ev.DataBound("onDataBound"))
            .Content("<span class='k-icon' title='Move Top'></span>")
            .Events(ev => ev.Click("onClickTop"))
            .Content("<span class='k-icon' title='Move Bottom'></span>")
            .Events(ev => ev.Click("onClickBottom"))
            function onClickTop() {
                var listBox = $("#listBox").data("kendoListBox");
                var selectedItems =; // Get the selected item element.
                if (selectedItems.length > 0) {
                    listBox.reorder(selectedItems[0], 0); // Move it at position 1 (index 0).
            function onClickBottom() {
                var listBox = $("#listBox").data("kendoListBox");
                var selectedItems =; // Get the selected item element.
                var items = listBox.items(); // Get all ListBox items.
                if (selectedItems.length > 0) {
                    listBox.reorder(selectedItems[0], (items.length - 1)); // Move it at the last position.
            function onDataBound() {

For a runnable example based on the code above, refer to the REPL example on creating "moveTop" and "moveBottom" custom tools for the ListBox.

More ASP.NET MVC ListBox Resources

See Also

In this article