我在kendo网格下面。我想在asyn上传后删除'刻度标记'和'完成'。 怎么做?以下代码删除文本“完成”但刻度标记仍然可见。
剑道上传控件:
@(Html.Kendo().Upload()
.Name("files")
.Messages( m => m.Select("Browse"))
.Async(a => a
.Save("SaveAttachment", "Document")
.Remove("Remove", "Document")
.AutoUpload(true)
)
.Events(events => events
.Success("onSuccess")
)
.Multiple(false)
)
$("#files").kendoUpload({
multiple: true,
async: {
saveUrl: "...",
removeUrl: "...",
autoUpload: false
},
localization: {
// Override built-in text "Done"
headerStatusUploaded:"",
statusUploaded:""
}
...
});
答案 0 :(得分:2)
要隐藏所有邮件('正在上传...'完成')和图标,您可以使用简单的CSS:
.k-upload .k-upload-status.k-upload-status-total {
display: none;
}
如果您想要隐藏“完成”'和你说的勾选图标 - 你可以通过使用javascript事件来实现:
@(Html.Kendo().Upload()
.Name("files")
.Messages(m => m.Select("Browse"))
.Async(a => a
.Save("Submit", "Watchdog")
.AutoUpload(true)
)
.Events(events => events
.Success("onSuccess")
.Select("onSelect")
.Complete("onComplete")
)
.Multiple(false)
)
<script>
function onSelect(e) {
e.sender.element.closest('.k-upload').find('.k-upload-status.k-upload-status-total').show();
}
function onComplete(e) {
e.sender.element.closest('.k-upload').find('.k-upload-status.k-upload-status-total').hide();
}
</script>