How to use onReady from Power/Data grid

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

How to use onReady from Power/Data grid

Postby pitc » Fri Jun 18, 2021 1:08 am

The toolTip for the event is:
Called when the table is ready to be shown

the wiki has:
Event executed when the table is ready to be shown.

I think the ag-grid explanation is this:
When the grid is initialised, it will fire the gridReady event. If you want to use the APIs of the grid, you should put an onGridReady(params) callback onto the grid and grab the api(s) from the params. You can then call these apis at a later stage to interact with the grid (on top of the interaction that can be done by setting and changing the properties).

I do not understand the "ready to be shown" in the Servoy wiki..How should it be used? How do others use it?
The reason I ask is that sometimes there are warnings that the element is not yet in the DOM and perhaps I am attempting to change the grid at the wrong time (mostly to do with restoring columns states from a previously saved variable).

For example should I wait until the onReady event is received and not do any grid api changes at all (sometimes the grid might be in a flex layout which is is "hidden") until then?
Posts: 91
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 7 guests