Getting Grid1.getRowCount() is not a function error

I click on AppStudio’s Start in Desktop Browser to test the app. It runs all right.

Then, when I click on Chrome’s “Reload this page” I am getting an error that says “Grid1.getRowCount() is not a function”.

It looks like the grid hasn’t appeared yet on the screen when it is trying to run the function getRowCount().

How can I make sure that the grid is showing up first before the grid function is run?


Just to know cache is not “getting” you, go into chrome inspector and then on the reload button of chrome use right click and select the bottom option - clear cache and hard reload.

Also, if the project is a PWA, turn that off to see if it’s the PWA cache handling in SIDB is getting you.

I did that, and nothing changed, still getting error.
Please see my “Northwind Grid1.setValue( Busted” Topic.
It has a similar error message with a Grid that comes from the Common Toolbox section


It looks like the error is because the grid (or Form) hasn’t come into view yet. Maybe that’s it.

I think I found the problem.
I added MyDB.db,DB,CheckDBOpen,NSB.overwriteNever to the extraFiles list.
When I changed it to MyDB.db,DB,"",NSB.overwriteNever and changed the CheckDBOpen() function to Main(), things seemed to work all right.
It seems the call to CheckDBOpen(), which contained all my other opening of tables, was running before the Form was instantiated.
We’ll now see how this works on my phone concerning persisting data.
I am only an egg…