Are you replacing the existing data set or adding on to it?  The problem 
with waiting for a "next" button click on the last page is that the "next" 
button will be greyed out at that point, so the API won't register any 
click events on it.

On Thursday, January 17, 2013 4:21:13 AM UTC-5, Tanya Marinova wrote:
>
> OK thank you for your answer  but that way it  shows only for a second my 
> last page and immediately loads the first page of my new 100 records ( it 
> doesn't wait to click the next button  and it doesn't change my page 
> property and i need it because i show the number of page in a text box)!  
> So the result is only after clicking the next button it shows in the text 
> box   page 2 (before that when i show the first 10 records of my new 100 
> records it shows page 10 because the page property wasn't modified and 
> there was no page event )
>
> So now my question now is : is there any way to load the new records but 
> only after clicking the next button which will change my page property also?
>
> On Tuesday, January 15, 2013 6:33:45 PM UTC+2, asgallant wrote:
>>
>> Add an event listener for the "page" event and test the page property of 
>> the event:
>>
>> google.visualization.events.addListener(visualization, 'page', function (
>> e) {
>>     if (e.page == numberOfPages - 1) {
>>         // we have reached the last page, make an AJAX call for more data
>>     }
>> });
>>
>> On Tuesday, January 15, 2013 4:29:53 AM UTC-5, Tanya Marinova wrote:
>>>
>>> I've gor a big database with over 30 000 rows on my server. I want to 
>>> make a request to the server giving me the first 100 records and showing 
>>> them with googlevisualisation table paging api - 10 records per page!!! The 
>>> problem is that when i show all this 100 records and my next button is 
>>> disabled i want to make another ajax call to the server giving me the next 
>>> 100 rows. so is there any way to understand when there are no more records 
>>> and we are at the last page so i can make ajax call  for anoher 100 
>>> records. 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/hX4GV4TVzkkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to