I am creating a dynamic GridLayout in Nativescript following the example on there page:
https://docs.nativescript.org/ui/layouts/layout-containers
It allows my to make a GridLayout using javascript, as I need it to be dynamic.
However, I want to put this layout in a ScrollView.
I believe I'm meant to do something like this
const grid = new GridLayout();
const scroll = new ScrollView();
grid.addChild();
...
scroll.addView(grid);
I constantly get an error saying "addView" is not a function.
Is this the correct method? What 'require("");' do I need for the ScrollView?
Thanks