I am parsing JSON generated by php. This is how i populate the table:
fulllist['groups'].each(function(fulllist, index){
var data = new google.visualization.DataTable();
groups = fulllist;
groups['fields'].each(function(field, index){
data.addColumn('string', field.field_name);
});
data.addColumn('string', 'delete');
if(groups['items'] != null){
groups['items'].each(function(item, rowindex){
data.addRows(1);
item['values'].each(function(value,
index){
data.setCell(rowindex, index,
value.value, '<span
class="valueedit" id="valueedit_'+ value.value_id +'">' + value.value
+ '</span>');
});
});
}
data.sort([{column: 0}]);
var table = new
google.visualization.Table(document.getElementById
(fulllist.id));
table.draw(data, {showRowNumber: false, allowHtml:
true});
});
On Mar 17, 4:34 pm, rcrisman <[email protected]> wrote:
> Can you give us an example. and how are you generating the data. PHP,
> Java????
>
> On Mar 17, 11:26 am, "[email protected]"
>
> <[email protected]> wrote:
> > hi
> > I am generating multiple tables dynamically. my problem is that only
> > the last of these tables is sortable.
> > how could i solve this problem? if it helps: i use the same name for
> > the object each time i intialize the datatable.
>
> > thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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
-~----------~----~----~----~------~----~------~--~---