Maintain sorting of table after redrawing

13 views
Skip to first unread message

Manolis

unread,
Sep 29, 2009, 6:04:04 PM9/29/09
to Google Visualization API
I need to redraw the table because I have to reflect changes in a row
(user clicks a link and the text of the link changes). When i redraw
the table, the sorting gets refreshed and if the user had done some
custom sorting before, the changed row gets "lost". It is in the table
but you have to look for it. Is there a way to maintain / save the
custom sorting any user does so you can apply it when redrawing?

Thanks

Manolis

unread,
Sep 29, 2009, 10:03:14 PM9/29/09
to Google Visualization API
Ok i got it!
you add:
google.visualization.events.addListener(table, 'sort', sortHandler);
function sortHandler(e) {
newsortcolumn = e['column'];
newsortascending = e['ascending'];
}

same with page. and then you recall the variables when you redraw the
table.

thanks
Reply all
Reply to author
Forward
0 new messages