Ag Grid Showing No Row To Show When Data Is Loading Code Example


Example 1: ag grid showing no row to show when data is loading

this.gridOptions.suppressNoRowsOverlay = true; this.service.getData()   .subscribe(data => {     if (!data || !data.length) {       this.gridOptions.suppressNoRowsOverlay = false;       this.gridOptions.api.showNoRowsOverlay();     }

Example 2: ag grid showing no row to show

<ag-grid-angular   class="ag-theme-balham"   [columnDefs]="columnDefs"   [defaultColDef]="defaultColDef"   [rowData]="rowData"   (gridReady)="onGridReady($event)"   [overlayLoadingTemplate]="loadingTemplate"   [overlayNoRowsTemplate]="noRowsTemplate"         .         . ></ag-grid-angular>   export class AppComponent {   private noRowsTemplate;   private loadingTemplate;    constructor() {     this.loadingTemplate =       `<span class="ag-overlay-loading-center">data is loading...</span>`;     this.noRowsTemplate =       `"<span">no rows to show</span>"`;   } }

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android SDK Location Should Not Contain Whitespace, As This Cause Problems With NDK Tools