UI Widgets LoadIndicator

The widget used to indicate the loading process.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The dxLoadIndicator widget represents a loading process indicator displayed over the current view.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxLoadIndicator jQuery plug-in.

    HTML
    <div id="loadIndicator"></div>
    JavaScript
    $("#loadIndicator").dxLoadIndicator({
        visible: true
    });
  • Knockout
    Add a div element and apply the dxLoadIndicator binding to this element.

    HTML
    <div data-bind="dxLoadIndicator: {
        visible: true
    }"></div>
  • Angular
    Add a div element and apply the dx-load-indicator directive to this element.

    HTML
    <div dx-load-indicator="{
        visible: true
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxLoadIndicator section of the Individual Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController" style="height: 100%;">
    <div class="button" dx-button="{ text: 'Load', onClick: showIndicator }"></div><br />
    <div id="myLoadIndicator" dx-load-indicator="{ bindingOptions: { visible: 'indicatorVisible' }}"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.indicatorVisible = false,
    $scope.showIndicator = function () {
        $scope.indicatorVisible = true;
        setTimeout(hideIndicator, 3000);
    };
    hideIndicator = function () {
        $("#myLoadIndicator").dxLoadIndicator("instance").option("visible", false);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body {
    text-align: center;
}
.button{
    margin-top: 25px;
}
.dx-loadindicator{
    margin: 20px;
}
<div class="button" data-bind="dxButton:{text: 'Load', onClick: showIndicator}"></div><br />
<div data-bind="dxLoadIndicator: { visible: indicatorVisible }"></div>
var myViewModel = {
    indicatorVisible: ko.observable(false),
    showIndicator: function () {
        this.indicatorVisible(true);
        setTimeout($.proxy(this.hideIndicator, this), 3000);
    },
    hideIndicator: function(){
        this.indicatorVisible(false);
    }
}
ko.applyBindings(myViewModel);
body {
    text-align: center;
}
.button{
    margin-top: 25px;
}
.dx-loadindicator{
    margin: 20px;
}
<div class="button" id="loadButton"></div><br />
<div id="myLoadIndicator"></div>
$("#myLoadIndicator").dxLoadIndicator({
    visible: false
});
$("#loadButton").dxButton({
    text: 'Load',
    onClick: function () {
        $("#myLoadIndicator").dxLoadIndicator("instance").option("visible", true);
        setTimeout($.proxy(hideIndicator, this), 3000);
    }
});
var hideIndicator = function () {
    $("#myLoadIndicator").dxLoadIndicator("instance").option("visible", false);
}
body {
    text-align: center;
}
.button{
    margin-top: 25px;
}
.dx-loadindicator{
    margin: 20px;
}

Configuration

This section describes the configuration options of the dxLoadIndicator widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events exposed by this widget.