This is a migrated thread and some comments may be shown as answers.

Loading not showing

1 Answer 527 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Alban
Top achievements
Rank 1
Iron
Alban asked on 05 May 2017, 10:19 AM

Hi,

I am using a dropDownList to show some values in order to filter results on a grid.

I have use the 'change' event to see when the grid must be updated

$('#view-mode-selector').kendoDropDownList({
change: onModeSelectorChange
});

 

in the method onModeSelectorChange I am trying to show the progress bar with

kendo.ui.progress($("#grid), true);

and at the end of the method when all is done I have

kendo.ui.progress($("#grid), false);

But the data loads and I do not see the progress bar.

If I remove the last statement (the 'false' one) I can see the progress bar, but it never disappears.
If I debug, It appears and disappears when the data is ready.

It is not an issue of the data loading too fast, sometimes the data takes 5 seconds to be ready.
The data is already in the browser, I am just showing or hiding columns.

Kendo version v2016.2.714

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 09 May 2017, 08:37 AM
Hello Alban,

On the following Dojo example you will find a working example of a Kendo DropDownList, which uses the change event to dynamically replace the DataSource of a Kendo Grid. You will notice that I have toggled the loader immediately after the change event of the DropDownList is triggered. The important part here is that in order to properly hide the spinner, I have used the dataBound event of the Grid. This way you guarantee that the timing of the toggle function will be correct.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Alban
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Share this question
or