0
두 개의 목록 상자간에 끌어서 놓기 기능을 구현하기 위해 연결된 정렬 가능 목록을 사용하고 있습니다. 내가 선택한 요소를 (또는 드래그 후 두 번째 목록 상자에있는 항목을 나열하는) 어떻게 찾을 수 있으며 그것을 데이터베이스에 저장할 수 있도록 뒤에 코드로 보냅니다. Linqdatasource 데이터베이스 작업을 사용하고 있습니다. 내 자바 스크립트는연결된 정렬 된 목록에서 선택한 목록 항목을 찾는 방법
$(function() {
$("#Setter,#Getter").sortable({
connectWith: ".sortable",
recieve: function (e, ui)
{
var item = (this).valueOf("Section");
}
});
을 - 이것도 내 목록은 follows-
<asp:ListView ID="Listview1" runat="server" DataSourceID="LinqDataSource1" >
<LayoutTemplate>
Unallocated Sections <br />
<asp:Label ID="SetterCount" runat="server"></asp:Label>
<ul class="sortable" draggable="true" id="Setter" style="overflow: scroll; empty-cells: hide; height: 500px; width: 200px; border: solid 1px; background: #b6b6b6;" >
<li id="Li1" runat="server" draggable="true" >
<asp:PlaceHolder ID="PlaceHolder1" id-="itemPlaceholder" runat="server" ></asp:PlaceHolder>
</li>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li id="Li2" runat="server" title="Drag to Allocate sections" >
<%# Eval("Section")%>
</li>
</ItemTemplate>
</asp:ListView>
</td>
<td>
<asp:Repeater ID="Repeater" runat="server" DataSourceID ="LinqDataSource6">
<HeaderTemplate><ul class="sortable" draggable="true" id="Getter" style="overflow: scroll; empty-cells: hide; height: 500px; width: 200px; border: solid 1px; background: #b6b6b6;" ></HeaderTemplate>
<ItemTemplate>
<li id ="lI2" runat ="server">
<%# DataBinder.Eval(Container.DataItem, ("Section"))%>
</li>
</ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:Repeater>
</td>
</tr>
});