Shital Kadam
Shital Kadam

Reputation: 238

Hiding Upload button of kendo upload

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

Upvotes: 2

Views: 10703

Answers (5)

Arsen Khachaturyan
Arsen Khachaturyan

Reputation: 8360

In the case of Angular, here is Kendo's official example for it.


Note: you may need to apply ::ng-deep (missing in the example) on the CSS class to make it work:

::ng-deep .k-actions {
  display: none;
}

Upvotes: 1

vanquan223
vanquan223

Reputation: 149

You simply use

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

Dojo example

Upvotes: 1

Kristy Kavada
Kristy Kavada

Reputation: 113

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
})

Upvotes: 0

M. Noreikis
M. Noreikis

Reputation: 173

You can simply use

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

after initializing the widget. Example Dojo

Upvotes: 2

Alag
Alag

Reputation: 1408

for hide:

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

for completely removing

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

Dojo example

Upvotes: 1

Related Questions