How to add dynamic colums to celltable

1,005 views
Skip to first unread message

lucky

unread,
Aug 24, 2012, 9:06:38 AM8/24/12
to google-we...@googlegroups.com
Hi,

i have a requirement that i need to add dynamic columns to cell table.
i Google it but didn't find proper solution.

Please provide me some sample to add dynamic columns to cell table

Thanks in advance




Juan Pablo Gardella

unread,
Aug 24, 2012, 9:10:39 AM8/24/12
to google-we...@googlegroups.com
See http://stackoverflow.com/questions/7172262/create-gwt-celltable-dynamically

2012/8/24 lucky <lucky.b...@gmail.com>





--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qBLc060as0IJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

lucky

unread,
Aug 24, 2012, 9:19:18 AM8/24/12
to google-we...@googlegroups.com
if possible could you please provide me the brief sample example (like in the showcase).
Thanks

Juan Pablo Gardella

unread,
Aug 24, 2012, 9:30:57 AM8/24/12
to google-we...@googlegroups.com
Hi,

I show my code where use it.
   
CellTable<List<String>> table = new CellTable<List<String>>();
    List<List<String>> rows = ...   

    for (int column = 0; columna < columnCount; column++) {
      table.addColumn(new IndexedColumn(column), new TextHeader(columnsArray[column]));
    }

   final ListDataProvider<List<String>> provider = new ListDataProvider<List<String>>(rows);

    for (String[] row: rowsArray) {
      rows.add(Arrays.asList(row));
    }


2012/8/24 lucky <lucky.b...@gmail.com>
Reply all
Reply to author
Forward
0 new messages