Maverick
Maverick

Reputation: 1

Accessing ag-grid column visibility event completion

we are using ag-grid (v17.1) with angular in our project. We (need to display) displaying 160+ at a time in grid. On Select All / Deselect All, in tool panel, it takes around 15-20 seconds to show/hide the columns. I wanted to show overlay spinner for such event. Overriding the column visibility event does not provide us the exact time, when the ag-grid has completed with rendering the columns. I wanted clarification on below questions.

  1. How can we identify if ag-grid has completed rendering columns?
  2. Can we override tool panel and customize it? (I checked on ag-grid documentation and could not find a way to override tool panel)

Upvotes: 0

Views: 1809

Answers (1)

un.spike
un.spike

Reputation: 5113

onGridReady function indicates that the init process is done.

gridReady : ag-Grid has initialised.

Next, if you need data loading identification you can handle it by yourself via overlays

// show 'loading' overlay
gridOptions.api.showLoadingOverlay()

// show 'no rows' overlay
gridOptions.api.showNoRowsOverlay()

// clear all overlays
gridOptions.api.hideOverlay()

Also to override default overlays you can define it inside gridOptions as overlayLoadingTemplate and overlayNoRowsTemplate.

Tool panel customization available from 19.0 version

The Side Bar is now customizable with Custom Tool Panel Components.

Upvotes: 0

Related Questions