jquery - 使用 Kendo,如何通过单击按钮从多个 SharePoint 列表中删除 1 个项目?已经有 1 个工作,如何添加第二个 SharePoint 列表?
问题描述
我有在剑道网格上工作的 Destroy 方法。它成功地从 1 个 SharePoint 列表中删除了一个项目。但是,同一项目出现在我的应用程序的其他位置,因为它也在另一个 SharePoint 列表中。我也想从第二个列表中删除相同的项目,在这 1 次单击删除按钮上。
以下是当前适用于 1 个 SharePoint 列表的 kendo.transport.destroy 方法。如何添加第二个 SharePoint 列表?
destroy: {
url: function (options) {
console.log(options);
return _spPageContextInfo.webAbsoluteUrl +
"/_api/Web/Lists/GetByTitle('GalleryItems')/items(" + options.Id + ")"
},
cache: false,
type: 'DELETE',
dataType: 'json',
headers: {
"X-RequestDigest": $('#__REQUESTDIGEST').val(),
'Accept': 'application/json; odata=verbose',
"If-Match": "*"
},
contentType: "application/json"
}
//销毁列中的命令配置
{
command: ["edit",
{
name: "destroy",
text: "Delete",
class: "btn-delete"
}],
title: " "
}],
解决方案
推荐阅读
- php - PHP MYSQL 代码输出成输入“值”
- python - Python - 在数据框中检索数据框
- node.js - React - onbeforeunload 事件从未触发
- macos - 作曲家 SSL Err mac os high sierra
- plot - Sage 数学绘图点我更大的尺寸问题
- loops - SAS - 使用循环调用具有不同参数的宏
- asp.net-core - 在 blazor 应用程序中使用 mudblazor 实现通用表格组件。.net 核心
- python - 是否有可能将 CuPy 阵列输入到 Detectron 模型中?
- java - 没有 JDBC 类型的方言映射:1111 试图映射出一个 jsob 对象
- javascript - Gulp 4 异步完成错误:TypeError [ERR_INVALID_ARG_TYPE]:“时间”参数必须是 Array 的实例。收到空?