JavaScript/jQuery LoadPanel - Show on Page Load
To display a LoadPanel on page load, initialize the component with visible set to true. You can hide the LoadPanel once your page or data finishes loading. The following code snippet demonstrates how to hide the component after ODataStore finishes loading data:
index.js
- $(() => {
- const data = new DevExpress.data.ODataStore({
- url: "https://js.devexpress.com/Demos/DevAV/odata/Products",
- });
- const loadPanel = $('#loadpanel').dxLoadPanel({
- shadingColor: 'rgba(0,0,0,0.4)',
- visible: true,
- }).dxLoadPanel('instance');
- data.load().then(() => {
- loadPanel.hide();
- })
- });