# Transfer ListBox Items on Double Click

## Environment

<table>
	<tbody>
        <tr>
			<td>Product</td>
			<td>Progress® Telerik® UI ListBox for UI for ASP.NET MVC</td>
		</tr>
	</tbody>
</table>

## Description

How can I transfer items between ListBoxes by double-clicking the Telerik UI for ASP.NET MVC ListBox?

## Solution

1. Handle the [`dblclick`](https://api.jquery.com/dblclick/) event on the items in both ListBoxes.
2. In the event handler, based on the ListBox, manually execute the `transferTo` or `transferFrom` command.

```Razor Index.cshtml
@(Html.Kendo().ListBox()
            .Name("listBoxA")
            .ConnectWith("listBoxB")
            .BindTo(new List<string>() { "Value 1", "Value 2", "Value 3"}))

@(Html.Kendo().ListBox()
            .Name("listBoxB")
            .BindTo(new List<string>())
            .Selectable(ListBoxSelectable.Multiple))
```

```JS script.js
    $(document).ready(function () {
        var listBoxB = $("#listBoxB").data("kendoListBox");
        var listBoxA = $("#listBoxA").data("kendoListBox");
        listBoxA.wrapper.find(".k-list").on("dblclick", ".k-item", function (e) {
            listBoxA._executeCommand("transferTo");
        });

        listBoxB.wrapper.find(".k-list").on("dblclick", ".k-item", function (e) {
            listBoxA._executeCommand("transferFrom");
        });
    })
```

## More ASP.NET MVC ListBox Resources

* [ASP.NET MVC ListBox Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/listbox/overview)

* [ASP.NET MVC ListBox Demos](https://demos.telerik.com/aspnet-mvc/listbox)

* [ASP.NET MVC ListBox Product Page](https://www.telerik.com/aspnet-mvc/listbox)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Client-Side API Reference of the ListBox for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/listbox)
* [Server-Side API Reference of the ListBox for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/api/listbox)
* [Telerik UI for ASP.NET MVC Breaking Changes](https://www.telerik.com/aspnet-mvc/documentation/backwards-compatibility/2023-backwards-compatibility)
* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
