Look at this simplified example. If you run this, you should see a table with no column or data "D".
public class HiddenColumnTest implements EntryPoint { public void onModuleLoad() { FlexTable table = new FlexTable(); HTMLTable.CellFormatter cellFormatter = table.getCellFormatter(); String alphas = "ABCDEFG"; for (int col=0; col < alphas.length(); col++) table.setText(0, col, "Column "+alphas.charAt(col)); table.getRowFormatter().setStyleName(0, "columnHeader"); cellFormatter.setStyleName(0, 3, "hidden-Column"); // No D for (int row=1; row <= 6; row++) { for (int col=0; col < alphas.length(); col++) table.setText(row, col, "Data "+row+"-"+alphas.charAt(col)); cellFormatter.setStyleName(row, 3, "hidden-Column"); // No D } RootPanel.get().add(table); } } In the CSS: .columnHeader { font-weight: bold; } .hidden-Column { display: none; } On Jul 8, 11:38 am, Magnus <alpineblas...@googlemail.com> wrote: > Hm, this doesn't work for me. > > All the cells are shifted in their horizontal positions... > > With your method the table does not behave as if the column width were > 0px. > > I wonder how to deal with this stuff... > > Magnus > > On Jul 7, 7:47 pm, Thad <thad.humphr...@gmail.com> wrote: > > > I do this in a number of places in my application. Use your style > > sheet: > > > DoubleClickTable rootTable = new DoubleClickTable(); // my class that > > extends FlexTable > > HTMLTable.CellFormatter cellFormatter = rootTable.getCellFormatter(); > > ... > > rootTable.setText(row, ROWID_COL, record.getAttribute("rowid")); > > // Set other fields. > > rootTable.getRowFormatter().setStyleName(row, "unselectedRow"); // > > style the row > > cellFormatter.setStyleName(row, ROWID_COL, "hidden-Column"); // hide > > the cell > > > In the CSS, > > > .hidden-Column { > > display: none; > > > } > > > On Jul 7, 12:54 pm, Magnus <alpineblas...@googlemail.com> wrote: > > > > Hi, > > > > I would like to use a FlexTable as a list of users and I need to > > > attach a user id to each row somehow, in order to identify the user > > > when a row is selected. > > > > I tried to use a column of width "0px", but this column is visible... > > > > How would you do that? > > > > Thanks > > > Magnus -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.