2

I want to hide the 'Upload file' button of kendo upload since I am using my custom button for uploading file.

I have written the code on select file of kendo upload as,

function onSelect() {
    $('.k-upload-selected').css("display", "none");
}

I have tried with the following css also,

.k-upload-selected{
    display: none;
}

But the upload button is still there...

Please help me..enter image description here

4

4 回答 4

2

你可以简单地使用

$(".k-button.k-upload-button").css("visibility", "hidden");

初始化小部件后。示例道场

于 2015-12-17T12:54:18.060 回答
1

隐藏:

$('.k-upload-selected').css('visibility', 'hidden');

用于完全去除

$('.k-upload-selected').remove();

道场示例

于 2015-12-17T12:49:49.427 回答
1

您只需使用

<style>
  .k-clear-selected, .k-upload-selected{
    display: none !important;
  }
</style>

道场示例

于 2019-11-26T07:40:05.150 回答
0

如果您使用 Kendo for Angular,您需要将组件中的封装设置为ViewEncapsulation.None

@Component({
    selector: 'upload-selector',
    templateUrl: 'upload.component.html',
    styleUrls: ['upload.css'],
    encapsulation: ViewEncapsulation.None
})
于 2019-05-14T11:16:45.383 回答