transferToDestination for different items selected

2 posts, 0 answers
  1. TheFool
    TheFool avatar
    3 posts
    Member since:
    Jul 2011

    Posted 23 Feb 2012 Link to this post

    hi folks,
    i've this code:
    <telerik:RadListBox ID="lista1" runat="server" Height="230px" Width="250px" TransferToID="lista2" SelectionMode="Multiple"/>
    <telerik:RadListBox ID="lista2"  runat="server" Height="230px" Width="250px" SelectionMode="Multiple" />
    <asp:Button ID="btnTransferRight" OnClientClick="return trasferisciBoxDestra()" Text=">>"  runat="server" />

    where in javascript i've this function:
    function trasferisciBoxDestra() { 
                var listbox = $find("<%= lista1.ClientID %>");
                var elemSelezionato = listbox.get_selectedItem();
                if (elemSelezionato == null) {
                    alert("Bisogna selezionare almeno un elemento.");
                    return false;
                }
                listbox.transferToDestination(elemSelezionato);
                return false;
            }

    How can i select different items with control button and send them by "transferToDestination" method pass it an array?
    thanks in advance. 
  2. TheFool
    TheFool avatar
    3 posts
    Member since:
    Jul 2011

    Posted 23 Feb 2012 Link to this post

    my solution:

    for (var i = 0; i < conteggio; i++) {
                    listbox.transferToDestination(lista1.get_selectedItem());
                }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top