item disappears when the transfer mode=copy

6 posts, 1 answers
  1. Anjali
    Anjali avatar
    101 posts
    Member since:
    Dec 2010

    Posted 01 Jul 2011 Link to this post

    Hi,

      I have two listboxes, On my left side of list boxes, I have some items, when i transfer the items to the right side listbox, I add two checkboxes before those items. Everything works fine when the transferMode = move, but when I changed the transferMode=Copy then when I move the item from the left listbox to the right listbox, the checkboxes appear in the right list box, but items don't appear.
    I am not sure what am I doing wrong. below is my code
    <td style="width:"10%" >
               ag: <br />
                   <telerik:RadListBox runat="server" ID="RadListBox_Unselectedag" AutoPostBack="false"
                   Width="120px" Height="200px" 
                   TransferToID="RadListBox_selectedag" AllowTransfer="true" TransferMode="Copy"
                   AutoPostBackOnTransfer="true" SelectionMode="Multiple" AllowDelete="false" AllowReorder="false" ontransferred="RadListBox_Unselectedag_Transferred" >
               </telerik:RadListBox>
           </td>
           <td style="width:"2%">aselected <br />
               <telerik:RadListBox runat="server" ID="RadListBox_selectedag" AllowDelete="true" AllowReorder="false"
                   AutoPostBack="false" SelectionMode="Multiple" Width="140px" Height="200px"    >
                   <ItemTemplate>
                     
                      <asp:CheckBox ID="chkAD" runat="server" />
                       <asp:CheckBox ID="chkAS" runat="server" />
                       <asp:Label ID="lblagSelected" runat="server" Text='<%# DataBinder.Eval(Container,"Text") %>'></asp:Label>
                   </ItemTemplate>
                    
               </telerik:RadListBox>
             
           </td>
           <td>

    My code behind looks like this

    protected void RadListBox_Unselectedag_Transferred(object sender, RadListBoxTransferredEventArgs e)
            {
                foreach (RadListBoxItem item in e.Items)
                {
                    item.DataBind();
                }
            }

  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 06 Jul 2011 Link to this post

    Hello Anjali,

    The issue occurs, because you are using ItemTemplate into RadListBox control. Please review the attached project. In your scenario it is possible to use the property of the RadListBox, CheckBoxes="True".

    Greetings,
    Peter Filipov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anjali
    Anjali avatar
    101 posts
    Member since:
    Dec 2010

    Posted 06 Jul 2011 Link to this post

    Hi,

      The attached project does not have any checkboxes, I need two columns of checkboxes in my sourcelistbox. can you give me example that has two columns of checkboxes.

    Thanks,

    Anjali
  5. Anjali
    Anjali avatar
    101 posts
    Member since:
    Dec 2010

    Posted 06 Jul 2011 Link to this post

    I tried the code line by line, didn't work. I need two columns of checkboxes.
  6. Answer
    Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 12 Jul 2011 Link to this post

    Hello Anjali,

    I was able to reproduce your issue. Please review the attached project. Please bind the RadListBox on the right side when an item is transferred.

    Best wishes,
    Peter Filipov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  7. Anjali
    Anjali avatar
    101 posts
    Member since:
    Dec 2010

    Posted 12 Jul 2011 Link to this post

    Thanks Peter!!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017