RadListBox - TransferAll

5 posts, 0 answers
  1. Konstantin Vyaznikov
    Konstantin Vyaznikov avatar
    2 posts
    Member since:
    Oct 2009

    Posted 29 Oct 2009 Link to this post

    Is there a way to transfer all items from source listbox to destination listbox on a client side using javascript?

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 29 Oct 2009 Link to this post

    I believe this documentation article, with some modification, should allow you to transfer all of the items in your RadListBox through client-side.
  3. Genady Sergeev
    Genady Sergeev avatar
    1600 posts

    Posted 02 Nov 2009 Link to this post

    Hello Konstantin Vyaznikov,

    Transferring items on the client using JavaScript is supported by default. The only thing you need to do is to set the TransferTo property of the source and make sure that the AllowTransfer property is set to true. You can find example demonstrating the approach here.

    Kind regards,
    Genady Sergeev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Warren
    Warren avatar
    24 posts
    Member since:
    May 2008

    Posted 28 Jun 2014 Link to this post

    I know this forum question is quite old but I wanted to share this javascript function I created to transfer all items from the source listbox to the destination listbox or all items from the destination listbox to the source listbox.  I wrote this to handle the user checking a checkbox to indicate an "All" items.  I then added a client onclick to the ASP.NET checkbox to call this function.  Make sure the source list box has these set AllowTransfer="true" and the TransferToID="destinationListBox".

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function TransferAllListBoxItems(sourceListBoxName,destListBoxName,checked)
                var listSrc = $find(sourceListBoxName);
                var listDst = $find(destListBoxName);
                    while (listSrc.get_items().get_count() > 0) {
                    while (listDst.get_items().get_count() > 0) {
  5. Nencho
    Nencho avatar
    1849 posts

    Posted 02 Jul 2014 Link to this post

    Hello Warren,

    Thank you for sharing your solution with the community.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top