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

Problem with transfer radlistbox items

4 Answers 343 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Sudhanshu Tripathi
Top achievements
Rank 1
Sudhanshu Tripathi asked on 26 May 2010, 11:17 AM
HI,
  I am getting problem with transfering the item from source to destinaion listbox. when transferring the data then source listbox lost the item while destination show blank row. i am using following code

 

<telerik:RadListBox ID="lstSourceCity" runat="server" AllowTransfer="true" EnableDragAndDrop="false"

 

 

 

Height="205px" TransferMode="Move" TransferToID="lstDestinationCity" Width="350px"

 

 

 

SelectionMode="Multiple" CssClass="Align" OnItemDataBound="lstSourceCity_ItemDataBound" OnTransferred="lstSourceCity_Transferred" AutoPostBackOnTransfer="true">

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lblCity" runat="server" Text='<%# Eval("CityName") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadListBox>

 

 

 

<telerik:RadListBox ID="lstDestinationCity" runat="server" Height="205px" Width="350px"

 

 

 

CssClass="Align" OnItemDataBound="lstDestinationCity_ItemDataBound">

 

 

 

<ItemTemplate>

 

 

 

<asp:CheckBox ID="chkIsFeatured" runat="server" />

 

 

 

<asp:Label ID="lblDestCity" runat="server" Text='<%# Eval("CityName") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadListBox>

 

 

protected void lstSourceCity_Transferred(object sender, RadListBoxTransferredEventArgs e)
{     

 

 

foreach (RadListBoxItem listBoxItem in e.Items)

 

{

listBoxItem.DataBind();

}

 I am searching the soluntion for last couple of day but did not find exact solution.

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 28 May 2010, 04:04 PM
Hello Sudhanshu Tripathi,

Transferring templated items from two databind listboxes requires some additional codding. I am attaching sample project  that demonstrates a possible approach.

Sincerely yours,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Sudhanshu Tripathi
Top achievements
Rank 1
answered on 01 Jun 2010, 09:00 AM
Hi Genady,
            thanks for reply .  your code is very helpful.
0
Birol
Top achievements
Rank 1
answered on 11 Oct 2011, 11:01 PM
Hi.
Is it possible transfering items without using postback?
I just want to use client side scripting.
Thanks
0
Dimitar Terziev
Telerik team
answered on 12 Oct 2011, 02:23 PM
Hello Birol,

You could transfer items entirely on the client-side as shown on this demo here (uncheck the Auto postback on transfer check box to the right) , but this scenario is not supported when you have server controls in item template or data binding expressions.

Kind regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ListBox
Asked by
Sudhanshu Tripathi
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Sudhanshu Tripathi
Top achievements
Rank 1
Birol
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or