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

Rad List Box transfer from source to destination

2 Answers 179 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Vvamc
Top achievements
Rank 1
Vvamc asked on 07 May 2014, 01:50 PM
Hi ,

I have two Rad list box . On is the source and the other is the destination. The source list box is bound with data and on transfer to Destination i wanted a jquery event to fire so that the items in the Radlist Destination would refresh the Grid to the those items which are moved from source to destination. For example I Have selected Employee 2 and employee 4 to be moved to destination my rad grid should refresh and display data with employees 2 and 4. Please help me out i am not able to choose the proper even. I have used on client load but it works but it continuously loads without stopping.The page is continuously refreshed.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 12 May 2014, 08:20 AM
Hello,

Please find below an easy and convenient way to achieve the desired functionality using the RadListBox OnClientTransferred client-side event. This event will be fired when user clicks on the button to transfer the selected items from the source to the destination RadListBox
<script type="text/javascript">
    //Put your JavaScript code here.
 
    function OnClientTransferred(sender, args) {
        var grid = $find("<%= RadGrid1.ClientID %>");
    //here goes the logic to be executed when items are transfered between the source and destination RadListBoxes
}
</script>
<div>
    <telerik:RadListBox ID="RadListBoxSource" runat="server" OnClientTransferred="OnClientTransferred" AllowTransfer="true" TransferToID="RadListBoxDestination">
        <Items>
            <telerik:RadListBoxItem Text="Employee 1" />
            <telerik:RadListBoxItem Text="Employee 2" />
            <telerik:RadListBoxItem Text="Employee 3" />
            <telerik:RadListBoxItem Text="Employee 4" />
        </Items>
    </telerik:RadListBox>
    <telerik:RadListBox ID="RadListBoxDestination" runat="server"></telerik:RadListBox>
    <telerik:RadGrid ID="RadGrid1" runat="server"></telerik:RadGrid>
</div>

In this help article you may find more information about the RadListBox OnClientTransferred client-side event.

Regards,
Boyan Dimitrov
Telerik
 

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.

 
0
Vvamc
Top achievements
Rank 1
answered on 23 May 2014, 03:22 PM
Thank you 
Tags
ListBox
Asked by
Vvamc
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Vvamc
Top achievements
Rank 1
Share this question
or