How to control the visibility of default buttons

2 posts, 0 answers
  1. Kozachenko
    Kozachenko avatar
    1 posts
    Member since:
    Jul 2017

    Posted 17 Apr 2018 Link to this post

    My upload control creates in angularJS controller as following:

    _createUploader(inputName, initialFiles, asyncSettings, onCompleteHandler){
        return $('#' + inputName).kendoUpload({
            async: asyncSettings,
            complete: onCompleteHandler,
            files: initialFiles
        })
    }

     

    But there are some buttons, which I want to hide or show (upload and pause)

    https://snag.gy/uNVepn.jpg
    https://snag.gy/AkRuzj.jpg

    How I can control visibility of these buttons

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2062 posts

    Posted 19 Apr 2018 Link to this post

    Hello Vitalii,

    The Upload does not have configuration options that allow you to set the visibility of the "Upload" and "Pause" buttons. They can be hidden/shown in the respective Upload event handlers with the hide/show methods as demonstrated in this dojo example.
    The "Upload" button is hidden in the select event handler:
    $scope.onSelect = function(e) {
      setTimeout(function() {
        angular.element(".k-upload-selected").hide();
      }, 0);
    }
    Note that with this button hidden you will not be able to start the upload manually.

    And the "Pause" button can be hidden in the progress event handler:
    $scope.onProgress = function(e) {
      angular.element(".k-file .k-upload-status .k-button[aria-label='Pause']").hide();
    }


    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top