How transferFromDestination in radListbox in clientside

5 posts, 0 answers
  1. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 22 Apr 2011 Link to this post

    Hi,

    I am using two radlistbox. transferToDestination working correctly. but transferFromDestination is not working.

    I have attached my code here,,,
       <telerik:RadListBox
            runat="server" ID="RadListBoxSource"
            Height="200px" Width="200px"
            AllowTransfer="true" TransferToID="RadListBoxDestination" AllowReorder="true" OnClientItemDoubleClicked="setText">
            <Items>
                <telerik:RadListBoxItem Text="Argentina" />
                <telerik:RadListBoxItem Text="Australia" />
                <telerik:RadListBoxItem Text="Brazil" />
                <telerik:RadListBoxItem Text="Canada" />           
                <telerik:RadListBoxItem Text="India" />         
            </Items>
        </telerik:RadListBox>
        
        <telerik:RadListBox
            runat="server" ID="RadListBoxDestination" OnClientItemDoubleClicked="returnText"
            Height="200px" Width="200px" />


    javascript
    ------------
       function setText(sender, args) {
                    var val = args.get_item().get_value();      
                        sender.transferToDestination(args.get_item());            
                    }

                    function returnText(sender, args) {
                        var val = args.get_item().get_value();
                        sender.transferFromDestination(args.get_item());
                    }

    Please check code. i want two suggestion,
    1. how to transferFromDestination in client side
    2. if working transferFromDestination means first radlistbox display same order (whatever order displaying when page loaded.)

    Please give me tips for these two things,

    Thanks in Advance,
    Dhamu
  2. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 22 Apr 2011 Link to this post

    Hi,

    I got answer for transferFromDestination. but how disply same order the radListBox after transferFromDestination. because now displaying last record.

    is there any possible way for this one?

    Please give high importance for this one.

    Thanks in advance,
    Dhamu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 27 Apr 2011 Link to this post

    Hi,

    Please add the following code into your code behind to sort all of the items into RadListBox controls. E.g. :

    protected void Page_PreRender(object sender, EventArgs e)
    {
    RadListBox1.Sort = RadListBoxSort.Ascending;
    RadListBox1.SortItems();
    RadListBox2.Sort = RadListBoxSort.Ascending;
    RadListBox2.SortItems();
    }


    Regards,
    Peter Filipov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 27 Apr 2011 Link to this post

    Hi Peter,

    I want client side code for sorting..

    is this possible?

    Thanks,
    Dhamu.
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Apr 2011 Link to this post

    Hello Dhamu,

    Check out the following forum which discussed the same scenario
    Sorting content Listbox

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017