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

How transferFromDestination in radListbox in clientside

4 Answers 108 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 22 Apr 2011, 09:01 AM
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

4 Answers, 1 is accepted

Sort by
0
Dhamodharan
Top achievements
Rank 1
answered on 22 Apr 2011, 09:10 AM
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.
0
Peter Filipov
Telerik team
answered on 27 Apr 2011, 01:02 PM
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.

0
Dhamodharan
Top achievements
Rank 1
answered on 27 Apr 2011, 01:29 PM
Hi Peter,

I want client side code for sorting..

is this possible?

Thanks,
Dhamu.
0
Shinu
Top achievements
Rank 2
answered on 27 Apr 2011, 02:13 PM
Hello Dhamu,

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

Thanks,
Shinu.
Tags
ListBox
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Dhamodharan
Top achievements
Rank 1
Peter Filipov
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or