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

Listbox Transfer with checkbox

2 Answers 124 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Kenny
Top achievements
Rank 1
Kenny asked on 15 May 2014, 08:43 AM
Currently I'm working on listbox with checkbox selection for transfer purpose. I'm able to transfer the checked item in source to destination listbox with the following script.
function clientTransfering(sender, args) {
        args.set_cancel(true);
        var checkedNodes = args.get_sourceListBox().get_checkedItems();
        for (var i in checkedNodes) {
            var item = checkedNodes[i];
            args.get_sourceListBox().transferToDestination(item);
        }
    }
But I not able to transfer checked item from destination listbox back to the source listbox.
Is there any way of transferring destination listbox item with checkbox back to the source listbox?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 May 2014, 09:59 AM
Hi Kenny,

Please make sure that you have set the AllowTransfer property and TransferToID property of destination ListBox as follows.

ASPX:
<telerik:RadListBox ID="RadListBox1" runat="server" AllowTransfer="true" CheckBoxes="true"
    TransferToID="RadListBox2" OnClientTransferring="clientTransfering">
    <Items>
        <telerik:RadListBoxItem Text="Item1" />
        <telerik:RadListBoxItem Text="Item2" />
        <telerik:RadListBoxItem Text="Item3" />
        <telerik:RadListBoxItem Text="Item4" />
        <telerik:RadListBoxItem Text="Item5" />
    </Items>
</telerik:RadListBox>
<telerik:RadListBox ID="RadListBox2" runat="server" CheckBoxes="true" AllowTransfer="true"
    TransferToID="RadListBox1">
</telerik:RadListBox>

Let me know if you have any concern.
Thanks,
Shinu.
0
Kenny
Top achievements
Rank 1
answered on 16 May 2014, 12:28 AM
Hi Shinu,

Thanks for the reply. The transfer function is working properly now.
Tags
ListBox
Asked by
Kenny
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kenny
Top achievements
Rank 1
Share this question
or