How to get all row values tabulator?

Update for version 4.5+:

In version 4.5+ there is a function that lets you find the table with a query selector when the table variable is not accessible. http://tabulator.info/docs/4.6/options#find-table

const table = Tabulator.prototype.findTable('#example-table')[0];
const data = table.getData();

Original answer:

The issue is because you are declaring the table variable inside a function, so its scope is limited.

If you declare it in the global scope, and then assign it inside the function it will then be accessible everywhere.

//global scope
var table

//assign inside table - notice no "var"
function generateGrid(){
    table = new Tabulator("#example-table", { ....
}

//you can then use it everywhere
var data = table.getData();