Transferring items in ListBox not binding properly

6 posts, 0 answers
  1. Zeyad
    Zeyad avatar
    10 posts
    Member since:
    Mar 2011

    Posted 15 Mar 2011 Link to this post

    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
  2. Zeyad
    Zeyad avatar
    10 posts
    Member since:
    Mar 2011

    Posted 29 Mar 2011 Link to this post

    Any thoughts?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 29 Mar 2011 Link to this post

    Hello Zeyad,

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

    Kind regards,
    Helen
    the Telerik team
  5. Zeyad
    Zeyad avatar
    10 posts
    Member since:
    Mar 2011

    Posted 31 Mar 2011 Link to this post

    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? 
  6. Muhammad
    Muhammad avatar
    87 posts
    Member since:
    Oct 2012

    Posted 01 Apr 2011 Link to this post

    I am also facing the same problem ... can you please provide us some solution for this problem ...

    Thanks
  7. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 05 Apr 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017