use itemtemplate to get value after drag and drop

2 posts, 0 answers
  1. Baris
    Baris avatar
    34 posts
    Member since:
    Jul 2013

    Posted 21 Apr 2014 Link to this post

     <telerik:RadListBox ID="lbDSNominal" runat="server" Width="250px" BackColor="#2D1A44" SelectionMode="Multiple" AllowTransfer="true" AutoPostBackOnTransfer="true" TransferMode="Copy"
                                                        AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true" Skin="" CssClass="list contents_2" TransferToID="lbStrata" OnTransferred="lbDSNominal_Transferred">
                                                        <ItemTemplate>
                                                            <p style="font-size: 15px !important; width: auto; height: auto; color: white; padding-bottom: 0px !important; margin-bottom: 0px !important; margin-top: 0px !important;"><%# Container.DataItem %></p>
                                                        </ItemTemplate>
                                                    </telerik:RadListBox>

    <telerik:RadListBox ID="lbStrata" runat="server" SelectionMode="Multiple" AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true"
                                                                Skin="" Width="260px" Height="150px" AllowTransfer="true" AutoPostBackOnTransfer="true" BorderColor="MediumPurple" BackColor="#f2eff5">

                                                                <ItemTemplate>
                                                                    <div class="variables-list">
                                                                        <span><%# Container.DataItem %></span>
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadListBox>

    here is my code. I bind a list<String> to lbDSNominal's datasource. and I show data using <%# Container.DataItem %> in lbDSNominal. When I dragged an item to lbStrata in lbStrata itemtemplate, <%# Container.DataItem %> doesn't show any value? How can I fix it?


  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Apr 2014 in reply to Baris Link to this post

    Hi Baris,

    Please have a look into this forum thread which discuss about the same scenario. 

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top