eddieO
eddieO

Reputation: 119

How can I add loading indicator or a "spinner" to a kendo angular 2 grid?

I am using kendo angular 2 grid. I would like to add a loading indicator while the the call to a web service is made. It doesn't seem that kendo grid api supports this. How should I approach this?

Upvotes: 3

Views: 8699

Answers (2)

Giannis
Giannis

Reputation: 1840

In order to show that an operation is ongoing, you can just use the [loading] input parameter. Its default value is false, so set it to true to display the spinner.

If you want to apply a custom loading indicator, just use <div *ngIf="loading" class="k-i-loading"></div> and set loading accordingly (true when you make the request for data and false after you get the response from the web service).

From Kendo UI for Angular Documentation:

Built-in loading indicator

Implement a Loading Indicator Manually

Hope it helps.

Upvotes: 1

mast3rd3mon
mast3rd3mon

Reputation: 8825

You could use kendo-ui's no records template to build a custom message

Upvotes: 0

Related Questions