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

use itemtemplate to get value after drag and drop

1 Answer 43 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Baris
Top achievements
Rank 1
Baris asked on 21 Apr 2014, 01:02 PM
 <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?


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Apr 2014, 07:03 AM
Hi Baris,

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

Thanks,
Princy.
Tags
ListBox
Asked by
Baris
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or