LoadPanel Configuration

An object that defines configuration options for the dxLoadPanel widget.

animation

An object defining the animation options of the widget.

Type: animation configuration
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div style="width: 70%" class="dx-field-label">Animation Type</div>
    <div style="width: 30%" class="dx-field-value" data-bind="dxLookup: {
      dataSource: animationTypes,
      value: animationType,
      valueChangeAction: typeChanged
    }"></div>
  </div>
</div>
<div id="myLoadPanel" data-bind="dxLoadPanel: {
  message: 'Loading...',
  visible: loadPanelVisible,
  animation: animationConfig
}"></div>
animationTypes = [
  "fade",
  "pop",
  "slide"
];
loadPanelVisible = ko.observable(false);
animationType = ko.observable(animationTypes[0]);
animationConfig = ko.observable({});
typeChanged = function () {
  switch (animationType()) {
    case "slide":
      animationConfig({
        show: { type: "slide", from: { top: -$("#myLoadPanel").height() }, to: { top: 0 } },
        hide: { type: "slide", from: { top: 0 }, to: { top: -$("#myLoadPanel").height() } }
      });
      break;
    case "pop":
      animationConfig({
        show: { type: "pop", from: { scale: 0 }, to: { scale: 1 } },
        hide: { type: "pop", from: { scale: 1 }, to: { scale: 0 } }
      });
      break;
    case "fade":
      animationConfig({
        show: { type: "fade", from: 0, to: 1 },
        hide: { type: "fade", from: 1, to: 0 }
      });
      break;
    default:
      animationConfig({});
  }
}
startLoading = function () {
  loadPanelVisible(true);
  setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
  loadPanelVisible(false);
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

clickAction

An action performed when a widget is clicked.

Type: Action
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
  message: 'Loading...',
  visible: loadPanelVisible,
  clickAction: processClick
}"></div>
loadPanelVisible = ko.observable(false);
startLoading = function () {
  loadPanelVisible(true);
  setTimeout($.proxy(this.finishLoading, this), 3000);
};
finishLoading = function () {
  loadPanelVisible(false);
};
processClick = function () {
  DevExpress.ui.dialog.alert("The widget has been clicked", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

closeOnOutsideClick

A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window.

Type: Boolean
Default Value: false

contentReadyAction

An action performed when widget content is ready.

Type: Action
Default Value: null

deferRendering

Specifies whether widget content is rendered when the widget is shown or when rendering the widget.

Type: Boolean
Default Value: true

If this option is set to true, widget content is rendered when showing the widget. Otherwise, widget content is rendered when rendering the widget.

height

The height of the widget.

Type: Number
Default Value: 70

The option can hold a value of the following types.

  • numeric - the height of the widget in pixels
  • string - a CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit")
  • function - a function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; })

hiddenAction

An action performed after the widget is hidden.

Type: Action
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    hiddenAction: processHiding
}"></div>
loadPanelVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
processHiding = function () {
  DevExpress.ui.dialog.alert("The widget has been hidden", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

hidingAction

An action performed before hiding the widget.

Type: Action
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    hidingAction: processHiding
}"></div>
loadPanelVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
processHiding = function () {
  DevExpress.ui.dialog.alert("The widget is being hidden", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

message

The text displayed in the load panel.

Type: String
Default Value: "Loading ..."

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Message</div>
    <div class="dx-field-value" data-bind="dxTextBox: { value: loadPanelMessage }"></div>
  </div>
</div>
<div data-bind="dxLoadPanel: {
  message: loadPanelMessage,
  visible: loadPanelVisible,
  shading: false,
  clickAction: processClick
}"></div>
loadPanelVisible = ko.observable(false);
loadPanelMessage = ko.observable("Load panel message");
startLoading = function () {
  loadPanelVisible(true);
  setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
  loadPanelVisible(false);
};
processClick = function () {
  DevExpress.ui.notify("The widget has been clicked", "info", 1000);
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

position

An object defining widget positioning options.

Type: position configuration
Default Value: { my: 'center', at: 'center', of: window }

shading

A Boolean value specifying whether or not the main screen is inactive while the overlay is active.

Type: Boolean
Default Value: true

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    shading: loadPanelShading
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Shading</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: loadPanelShading }"></div>
  </div>
</div>
loadPanelVisible = ko.observable(false);
loadPanelShading = ko.observable(true);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

shadingColor

Specifies the shading color.

Type: String
Default Value: ''

This option makes sense only if the shading option is set to true.

showIndicator

A Boolean value specifying whether or not to show a load indicator.

Type: Boolean
Default Value: true

If this option is set to true, a message is displayed and a load indicator turns in a circle while the view's content is loaded. Set this option to false to display only the text message. This can help avoid problems with animation used for the load indicator when running on a slow device.

Show Example:
jQuery
<div id="button" data-bind="dxButton:{text: 'Load', clickAction: startLoading}"></div>
<div data-bind="dxLoadPanel:{message: 'Loading...', visible: loadPanelVisible, showIndicator: userShowIndicator}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div style="width:70%" class="dx-field-label">Show indicator</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: userShowIndicator }"></div>
  </div>
</div>
userShowIndicator = ko.observable(true);
loadPanelVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 3000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
body {
  text-align: center;
}
#button {
  margin-top: 25px;
}

showingAction

An action performed before showing the overlay.

Type: Action
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    showingAction: processShowing
}"></div>
loadPanelVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 3000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
processShowing = function () {
  DevExpress.ui.dialog.alert("The widget is being shown", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

shownAction

An action performed after the widget is shown.

Type: Action
Default Value: null

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    shownAction: processShowing
}"></div>
loadPanelVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 3000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
processShowing = function () {
  DevExpress.ui.dialog.alert("The widget has been shown", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

showPane

A Boolean value specifying whether or not to show the pane behind the load indicator.

Type: Boolean
Default Value: true

Show Example:
jQuery
<div id="button" data-bind="dxButton: { text: 'Load', clickAction: startLoading }"></div>
<div data-bind="dxLoadPanel: {
    message: 'Loading...',
    visible: loadPanelVisible,
    showPanel: paneVisible
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Show pane</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: paneVisible }"></div>
  </div>
</div>
loadPanelVisible = ko.observable(false);
paneVisible = ko.observable(false);
startLoading = function () {
    loadPanelVisible(true);
    setTimeout($.proxy(this.finishLoading, this), 2000);
};
finishLoading = function () {
    loadPanelVisible(false);
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: false

You can show and hide the widget by changing the value of an observable variable passed to this option.

Show Example:
jQuery
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Visible</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: loadPanelVisible }"></div>
  </div>
</div>
<div class="loadPanel" data-bind="dxLoadPanel: {
    message: 'Loading...',
    shading: false,
    visible: loadPanelVisible
}"></div>
loadPanelVisible = ko.observable(false);
loadPanelVisible.subscribe(function (newValue) {
    if (newValue)
        startTimer();
});
startTimer = function () {
    setTimeout(function () {
        loadPanelVisible(false);
    }, 2000);
};
body{
  text-align: center;
}
.button {
    margin: 10px;
}

width

The width of the widget.

Type: Number
Default Value: 200

The option can hold a value of the following types.

  • numeric - the widget width in pixels
  • string - a CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit")
  • function - the function returning the widget width (e.g., width:function(){ return baseWidth - 10 + "%"; })