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

transferToDestination for different items selected

1 Answer 82 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
TheFool
Top achievements
Rank 1
TheFool asked on 23 Feb 2012, 05:04 PM
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. 

1 Answer, 1 is accepted

Sort by
0
TheFool
Top achievements
Rank 1
answered on 23 Feb 2012, 05:50 PM
my solution:

for (var i = 0; i < conteggio; i++) {
                listbox.transferToDestination(lista1.get_selectedItem());
            }
Tags
ListBox
Asked by
TheFool
Top achievements
Rank 1
Answers by
TheFool
Top achievements
Rank 1
Share this question
or