Re: GWT CellTable getColumnWidth problem when inserting a Column object

2012-01-10 Thread Vibhas Zanpure
Oops I made a mistake in the earlier post. Its working with
setColumnWidth() but NOT working when i pass that same column object
to getColumnWidth()... Any solution for this ? Thanks in advance.

-- 
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-toolkit@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.



Re: GWT CellTable getColumnWidth problem when inserting a Column object

2012-01-10 Thread Vibhas Zanpure
Sorry the code couldn't get indented when i posted earlier... Here is
the indented code :-

CellTable cellTable = new CellTable(10, tableRes);

// tableRes is a tableResources object to do custom styling on the
CellTable...

// I add some columns to the cellTable I have skipped that part of
code while posting here...The first column// added is a
CheckboxCell Column and rest are all TextCell columns.

cellTable.addCellPreviewHandler(new
CellPreviewEvent.Handler() {
 public void onCellPreview(CellPreviewEvent event) {
String type = event.getNativeEvent().getType();
if (type.equals("mousedown")) {
   int col = event.getColumn();
   Column column = (Column)cellTable.getColumn(col);
   Window.alert("CLICKED" + col + "/" +
event.getNativeEvent().getClientX() + "/" +
event.getNativeEvent().getClientY());
   int colOrigWidth =
Integer.parseInt(cellTable.getColumnWidth(column));
   System.out.println("Column " + col + " Original Width : " +
colOrigWidth);
}
 }
});



Any reason as to why getColumnWidth() is throwing up that error and
how to solve it?

-- 
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-toolkit@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.