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

Shital Kadam
  • 238
  • 2
  • 5
  • 14

4 Answers4

2

You can simply use

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

after initializing the widget. Example Dojo

M. Noreikis
  • 173
  • 6
1

for hide:

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

for completely removing

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

Dojo example

Ademar
  • 1,418
  • 1
  • 17
  • 27
1

You simply use

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

Dojo example

vanquan223
  • 139
  • 2
  • 5
0

If you are using Kendo for Angular you need to set encapsulation in the component to ViewEncapsulation.None.

@Component({
    selector: 'upload-selector',
    templateUrl: 'upload.component.html',
    styleUrls: ['upload.css'],
    encapsulation: ViewEncapsulation.None
})
Kristy Kavada
  • 113
  • 2
  • 9