Transfer template from one listbox to another

3 posts, 0 answers
  1. Rémy
    Rémy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 24 Jul 2012 Link to this post


    I have four listbox. Three of them contains items that could be transferred to the other. Users change the visible listbox with a radio button. Each listbox contains a different template item, so my listbox that receive items can't have a template item. I've try the client-side transfer mode but it's doesn't transfer the item completly; my item is display is plain text, without any html code. I've seen in the help documentation ( that I can't transfer template in client-side mode, only on server-side. I can't use transfer button between the listbox because we want the user to do one-click only to transfer one item, and not select and item and click on the button. I can't put a button element in each item because it will trigger an exception (ThrowIfMaxHttpCollectionKeysExceeded). Presently, I try to simulate a button with a div element, but I can't put an id in my item template because an id have to be unique in a HTML page, so I can't put an function assigned to this div...

    Exemple of a listbox:
    <telerik:RadListBox ID="lbxDepDisponibles"
            runat="server" Height="300px" Width="335px" Visible="false"
            TransferToID="lbxTraites" DataValueField="number" >
            <div class="listeDispo departementTraite">
                    <img class="adminButton" src="Images/Administre.gif" height="32" style="margin:0px" />
                <div class="dispoInfo">
                    <div class="cboContent" style="display:block;">
                        <span style="font-weight: bold;">
                            <%#DataBinder.Eval(Container, "Attributes['description']")%>
                            <span style="font-size: 10px;">
                                <br />Dep. # <%#DataBinder.Eval(Container, "Attributes['number']")%> - <%#DataBinder.Eval(Container, "Attributes['name']")%>

    My question is: how can I transfer an item from one listbox to another, with the item template, without using the transfer button, with a div element (or any other html element that is not an input element) that play the button role in each item?

    Thank you

    • Visual studio 2008 .NET 3.5 SP1
    • Windows 7
    • any browser
    • Telerik ASP.NET AJAX 2012.1.301.2
    • VB.NET
  2. Bozhidar
    Bozhidar avatar
    1096 posts

    Posted 27 Jul 2012 Link to this post


    I've attached a sample page that demonstrates the desired functionality. 
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Rémy
    Rémy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 31 Jul 2012 Link to this post

    Ok it works. Thank you!
Back to Top