- Home
- Forum
- Angular - EJ 2
- Show spinner
Show spinner
Hi,
I want show the grid spinner, but when I use the showSpinner() grid's function, I get an error
I attach an example
Thanks
Attachment: gridSpinner_4ae43f65.zip
SIGN IN To post a reply.
3 Replies
HJ
Hariharan J V
Syncfusion Team
April 5, 2019 12:09 PM UTC
Hi Manolo,
Greeting from Syncfusion.
Query: I want show the grid spinner, but when I use the showSpinner() grid's function, I get an error
We have checked the provided sample and by default, we have create the spinner while rendering the grid component. But you are tried to show the spinner in ngAfterViewInit event(before Spinner component creation) so that it cause the reported problem.
If you want to show the custom spinner in grid then refer the below code example and documentation.
|
<ejs-grid #grid [dataSource]='data' (created)='created($event)' height='400' width='100%'>
. . . . .
</ejs-grid>
|
|
import { setSpinner } from '@syncfusion/ej2-popups';
setSpinner({ template: '<div class="loader-centerd-screen"><div></div></div>' });
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
created(){
this.grid.showSpinner();
}
|
Help documentation : https://ej2.syncfusion.com/angular/documentation/spinner/template/?no-cache=1
If we misunderstood your query then share more details regarding your requirement it will helpful for us to validate further.
Regards,
Hariharan
MC
Manolo Capdevila
April 12, 2019 07:51 AM UTC
Hi,
I want show the grid spinner, not a custom spinner.
I've tested show the spinner in create and load event, but the spinner not appear
HJ
Hariharan J V
Syncfusion Team
April 15, 2019 12:56 PM UTC
Hi Manolo,
By default, we have shown the spinner while initial rendering of Grid and hide it after data binding(automatically). We suspect that in your sample you have limited data so that you are not able to view the spinner (you can put the debugger and check it out). In the below sample, we have used large amount of data so you can check the behavior.
Please share the scenario where you want show and hide the spinner in Grid that help us to validate further and to provide a better solution as soon as possible.
Regards,
Hariharan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MC Manolo Capdevila
- Apr 4, 2019 01:59 PM UTC
- Apr 15, 2019 12:56 PM UTC