I am using the following code to render a table which is pulling data from 
a Google Sheet.  This all works fine.  I am using a Limit of 20 to reduce 
the number of rows returned but I want the user to be able to page through 
the results and see Rows 21-40, 41-60, etc..   After 
reviewing 
https://developers.google.com/chart/interactive/docs/gallery/table?hl=en#events 
I can see there is an event for "page" but I'm not sure where to add this 
to my code.  Any help would be appreciated.  Here is my code currently:

<script type="text/javascript">
google.load('visualization', '1', {packages: ['table']});
</script>
<script type="text/javascript">
var visualization;

function drawVisualization() {

var query = new google.visualization.Query(
'https://docs.google.com/spreadsheets/d/19tRadwIu9HH8nKa81Vk4XJSmZdwCy5k2pyACB6ma0yo/edit?usp=sharing');

query.setQuery('SELECT A, B, C where upper(A) like upper("%<?php echo 
$search; ?>%") or upper(B) like upper("%<?php echo $search; ?>%") order by 
A asc limit 20 label A "Card Name", B "Pack Name", C "Rarity"');

query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + 
response.getDetailedMessage());
return;
}

var data = response.getDataTable();

visualization = new 
google.visualization.Table(document.getElementById('table'));
visualization.draw(data, {legend: 'bottom'});

}

google.setOnLoadCallback(drawVisualization);
</script>


-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/e1ae49a6-ddf0-4810-89ac-d2e7920ef739%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to