html - Kendo UI Sortable Connect With 不起作用
问题描述
我有两个可排序的列表。我想连接这个列表,这样我就可以在两个方向上将项目从一个列表移动到另一个列表。我使用可排序的 connectWith,但我仍然无法将列表项从一个列表移动到另一个列表。
这是代码:
<div class="k-card">
<div class="k-card-header">
<h5 class="k-card-title">No Doctors in Visit</h5>
</div>
<div class="k-card-body" style="overflow: auto;">
<div class="Leftlst">
<p class="ListTitle LeftTitle">Detailable</p>
@(Html.Kendo().ListView<ProductViewModel>()
.Name("Left_lstVw_0")
.TagName("div")
.ClientTemplateId("ProductLsttemplate")
.HtmlAttributes(new { @class = "ListViewClass" })
.DataSource(dataSource =>
{
dataSource.Read(read => read.Action("LftLstProduct_Read", "RepTeam", new
{ SpecialityID = 0, TeamID = Model.RepTeamID, PeriodID = currentPeriod, CustomerID = 0 }));
}))
</div>
<div class="Rightlst">
<p class="ListTitle rightTitle">Non-Detailable</p>
@(Html.Kendo().ListView<ProductViewModel>()
.Name("Right_lstVw_0")
.TagName("div")
.ClientTemplateId("ProductLsttemplate")
.HtmlAttributes(new { @class = "ListViewClass" })
.DataSource(dataSource =>
{
dataSource.Read(read => read.Action("RightLstProduct_Read", "RepTeam", new { SpecialityID = 0, TeamID = Model.RepTeamID, PeriodID = currentPeriod, CustomerID = 0 }));
}))
</div>
@(Html.Kendo().Sortable()
.For("#Left_lstVw_0")
//.Events(e => e.Change("lftlstChange"))
.Filter(".k-listview-content > div.product")
.ConnectWith("#Right_lstVw_0")
.PlaceholderHandler("placeholder")
.HintHandler("hint")
.Cursor("move")
)
@(Html.Kendo().Sortable()
.For("#Right_lstVw_0")
.Filter(".k-listview-content > div.product")
//.Events(e => e.Change("rghtlstChange").End("rghtlstEnd"))
.ConnectWith("#Left_lstVw_0")
.PlaceholderHandler("placeholder")
.HintHandler("hint")
.Cursor("move")
)
<script>
function placeholder(element) {
return element.clone().css("opacity", 0.1);
}
function hint(element) {
return element.clone().removeClass("k-state-selected");
}
</script>
</div>
</div>
我无法找出问题所在。
有人能帮我吗?
谢谢
解决方案
推荐阅读
- c# - 尝试通过 Angular 8 访问时出现 Identity Server 4 CORS 错误
- excel - 如何找到非活动工作簿的最后一行并复制/粘贴
- python - 在同一个excel文件中写入多个工作表
- excel - Vba Excel 信任访问 VBA 项目模型
- c# - 我可以在 C# 中将泛型类型转换为 Dictionary<,> 吗?
- cube - 索引犰狳 cx_cube 非连续行
- javascript - 如何从 MongoDB 返回一个对象,该对象包含一个带有其他集合 id 的数组?
- jenkins - 字符串中的常规脚本空间
- postgresql - 如何将 pgtype.Int4Array(来自 pgx 库)转换为 []int64 Golang 类型?
- python-3.x - 如何获取每个字典的字典值列表(字典常用)