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

Transferring items in ListBox not binding properly

5 Answers 93 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Zeyad
Top achievements
Rank 1
Zeyad asked on 15 Mar 2011, 07:22 AM
Hello,

I'm trying to create two ListBoxes, where items can be transferred from one ListBox to the other. The problem is that when items are transferred the items do not look like the original (they are missing the bound image). 

Here is the code I am using: 
     
                <telerik:RadListBox runat="server" ID="RadActorListBoxSource" Height="400px" Width="300px"
                    AllowTransfer="true" AllowTransferOnDoubleClick="true" ButtonSettings-ShowTransferAll="false"
                    EnableDragAndDrop="true" TransferToID="RadActorListBoxDestination" SelectionMode="Multiple"
                    DataSourceID="LinqDataSource4" CausesValidation="false" TransferMode="Move" DataValueField="ActorId">
                    <ItemTemplate>
                        <div>
                            <telerik:RadBinaryImage runat="server" ID="ActorImage" Width="50px" DataValue='<%# ((Binary) Eval("ActorImage")).ToArray() %>'
                                AutoAdjustImageControlSize="False" />
                            <%#  Eval("Name") %>
                        </div>
                    </ItemTemplate>
                </telerik:RadListBox>
                <telerik:RadListBox runat="server" ID="RadActorListBoxDestination" Height="400px"
                    Width="300px" EnableDragAndDrop="true" TransferMode="Move" SelectionMode="Multiple"
                    EmptyMessage="Please select at least one actor" CausesValidation="true" ValidationGroup="addSceneSubmit">
                    <ItemTemplate>
                        <div>
                            <telerik:RadBinaryImage runat="server" ID="ActorImage" Width="50px" DataValue='<%# ((Binary) Eval("ActorImage")).ToArray() %>'
                                AutoAdjustImageControlSize="False" />
                            <%#  Eval("Name") %>
                        </div>
                    </ItemTemplate>
                </telerik:RadListBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="RadActorListBoxDestination"
                    ErrorMessage="Please select at least one actor" ValidationGroup="addSceneSubmit">
                </asp:RequiredFieldValidator>
<asp:LinqDataSource ID="LinqDataSource4" runat="server" ContextTypeName="DataClassesDataContext"
        OrderBy="Name" Select="new (ActorId, Name, ActorImage)" TableName="Actors">
    </asp:LinqDataSource>

Any ideas what is going on? 

Thanks,
Zeyad

5 Answers, 1 is accepted

Sort by
0
Zeyad
Top achievements
Rank 1
answered on 29 Mar 2011, 05:09 AM
Any thoughts?
0
Helen
Telerik team
answered on 29 Mar 2011, 01:29 PM
Hello Zeyad,

Did you try to set the AutoPostBackOnTransfer property of RadListBox to true?

Kind regards,
Helen
the Telerik team
0
Zeyad
Top achievements
Rank 1
answered on 31 Mar 2011, 05:52 AM
I tried using AutoPostBackOnTransfer, but the transferred image and text does not show. Does it have something to do with me using a RadBinaryImage control? 
0
Muhammad
Top achievements
Rank 1
answered on 01 Apr 2011, 02:04 PM
I am also facing the same problem ... can you please provide us some solution for this problem ...

Thanks
0
Helen
Telerik team
answered on 05 Apr 2011, 04:11 PM
Hello all,

It would be very helpful for us if someone of you send us a sample project which demonstrates the issue. We will examine it locally and probably will find a solution.

Kind regards,
Helen
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
Tags
ListBox
Asked by
Zeyad
Top achievements
Rank 1
Answers by
Zeyad
Top achievements
Rank 1
Helen
Telerik team
Muhammad
Top achievements
Rank 1
Share this question
or